Marketplace API / Types
Viewer
ObjectSession context for the authenticated caller. Its fields are visible only to that caller.
type ViewerFields
| Field | Type | Description |
|---|---|---|
access | ViewerAccess! | The caller's chat capabilities. |
canGoLive | Boolean! | Whether the authenticated user can start a livestream. |
canPostAnnouncements | Boolean! | Whether the authenticated user can post announcements. |
canSell | Boolean! | Whether the authenticated user can list products for sale. |
carts | [Cart!]! | The authenticated user's active carts. |
defaultAddress | Address | The default shipping address for checkout. Falls back to the most recently added active address. Null when the user has no active address. |
defaultPaymentCard | PaymentCard | The buyer's default saved card. Falls back to the most recently saved card. Null when the buyer has no saved card. |
directConversationWith | DirectConversationLookup | 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. |
directConversations | ViewerDirectConversationConnection! | 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. |
orders | ViewerOrderConnection! | 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. |
retryableCheckouts | ViewerRetryableCheckoutConnection! | 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 |
unreadChatMentionCount | NonNegativeInt! | Unread mentions of the caller, summed over the channels the caller can read. |
user | User! | The caller's public profile. |