Marketplace API / Types

Viewer

Object

Session context for the authenticated caller. Its fields are visible only to that caller.

type Viewer

Fields

FieldTypeDescription
accessViewerAccess!
The caller's chat capabilities.
canGoLiveBoolean!
Whether the authenticated user can start a livestream.
canPostAnnouncementsBoolean!
Whether the authenticated user can post announcements.
canSellBoolean!
Whether the authenticated user can list products for sale.
carts[Cart!]!
The authenticated user's active carts.
defaultAddressAddress
The default shipping address for checkout. Falls back to the most recently added active address. Null when the user has no active address.
defaultPaymentCardPaymentCard
The buyer's default saved card. Falls back to the most recently saved card. Null when the buyer has no saved card.
directConversationWithDirectConversationLookup
The caller's conversation with a user, or the state of a conversation that has not started. Null when no user matches.Arguments:
userId: ID! — The other user's globally unique ID.
directConversationsViewerDirectConversationConnection!
The caller's conversations with members, newest message first. first defaults to 20, at most 100. With where.hasUnreadMessages: true, totalCount is the number of unread conversations. With where.inbox: [REQUESTS], totalCount is the number of message requests.Arguments:
after: String — Cursor for forward pagination.
first: Int — Maximum number of conversations to return.
where: DirectConversationWhereInput — Filters to apply.
ordersViewerOrderConnection!
Orders that the caller bought, newest first; ties sort by ID. Omits unconfirmed orders, and cancelled orders of a buy-now or cart checkout. Keeps orders awaiting payment. Query.order finds an omitted order by its ID.Arguments:
after: String — Return orders after this cursor.
first: Int — Maximum number of orders to return. Defaults to 20, at most 100.
where: OrderWhereInput — Filters to narrow the list.
retryableCheckoutsViewerRetryableCheckoutConnection!
The caller's checkouts whose payment failed and can currently be retried, newest first. Each returned checkout has retryable: true at read time; retry from its url, or with retryCheckoutPayment.Requires a client key with one of these scopes: checkout:payments:manage checkout:payments:readArguments:
after: String — Return checkouts after this cursor.
first: Int — Maximum number of checkouts to return.
stripePaymentMethods[StripePaymentMethod!]!
Saved Stripe payment methods usable at checkout, most recently added first. Empty when the buyer has saved none.Requires a client key with one of these scopes: checkout:payments:manage checkout:paymentMethods:manage
unreadChatMentionCountNonNegativeInt!
Unread mentions of the caller, summed over the channels the caller can read.
userUser!
The caller's public profile.

Returned by