Storefront GraphQL
Schema Reference
Complete index of all 53 Queries and 45 Mutations across the 22 xclade Storefront & B2B GraphQL domains
Storefront GraphQL Schema Reference
Every operation below is compiled into your store's Go gqlgen binary and served from POST /graphql. For Merchant Admin operations (POST /admin/graphql), see Merchant Admin GraphQL.
Queries (53)
Catalog, Variants, Brands & Reviews (19)
| Query Signature | Access | Description |
|---|---|---|
products(limit: Int = 50, offset: Int = 0, filter: ProductFilterInput, order: ProductOrderInput, pricing_context: PricingContextInput): ProductConnection! | Public (cached) | List & search products with sales-channel scoping and contextual B2C/B2B variant pricing. |
product(id: ID!, pricing_context: PricingContextInput): Product | Public (cached) | Fetch a single product by ID. |
productByHandle(handle: String!, pricing_context: PricingContextInput): Product | Public (cached) | Fetch a single product by URL slug (handle). |
productVariants(limit: Int = 50, offset: Int = 0, filter: ProductVariantFilterInput, pricing_context: PricingContextInput): ProductVariantConnection! | Public (cached) | Search variants directly by SKU, product ID, or query text (ideal for B2B quick-order). |
productVariant(id: ID!, pricing_context: PricingContextInput): ProductVariant | Public (cached) | Fetch a single product variant by ID. |
collections(limit: Int = 50, offset: Int = 0, filter: CollectionFilterInput, order: CollectionOrderInput, pricing_context: PricingContextInput): ProductCollectionConnection! | Public (cached) | List merchandising collections. |
collection(id: ID!, pricing_context: PricingContextInput): ProductCollection | Public (cached) | Fetch a collection by ID. |
collectionByHandle(handle: String!, pricing_context: PricingContextInput): ProductCollection | Public (cached) | Fetch a collection by URL handle. |
productCategories(limit: Int = 50, offset: Int = 0, filter: ProductCategoryFilterInput, order: ProductCategoryOrderInput, pricing_context: PricingContextInput): ProductCategoryConnection! | Public (cached) | List hierarchical product categories (mpath, parent_category, category_children). |
productCategory(id: ID!, include_descendants_tree: Boolean, include_ancestors_tree: Boolean, pricing_context: PricingContextInput): ProductCategory | Public (cached) | Fetch a category by ID with optional ancestor/descendant tree expansion. |
productCategoryByHandle(handle: String!, include_descendants_tree: Boolean, include_ancestors_tree: Boolean, pricing_context: PricingContextInput): ProductCategory | Public (cached) | Fetch a category by URL handle. |
productTags(limit: Int = 50, offset: Int = 0, filter: ProductTagFilterInput): ProductTagConnection! | Public | List product tags. |
productTag(id: ID!): ProductTag | Public | Fetch a product tag by ID. |
productTypes(limit: Int = 50, offset: Int = 0, filter: ProductTypeFilterInput): ProductTypeConnection! | Public | List product taxonomy types. |
productType(id: ID!): ProductType | Public | Fetch a product type by ID. |
brands(limit: Int = 50, offset: Int = 0, filter: BrandFilterInput): BrandConnection! | Public (cached) | List product brands. |
brand(id: ID!): Brand | Public (cached) | Fetch a brand by ID. |
reviews(limit: Int = 10, offset: Int = 0, filter: ReviewFilterInput, order: ReviewOrderInput): ReviewConnection! | Public | List product reviews (storefront callers see approved reviews). |
review(id: ID!): Review | Public | Fetch a single review by ID. |
Regions, Currencies, Locales, Promotions & Site Settings (10)
| Query Signature | Access | Description |
|---|---|---|
locales: [Locale!]! | Public (cached · 60m) | List active store translation locales (code, name). |
currencies(limit: Int = 50, offset: Int = 0, filter: CurrencyFilterInput): CurrencyConnection! | Public (cached · 60m) | List supported ISO-4217 currencies. |
currency(code: ID!): Currency | Public (cached · 60m) | Fetch a currency by 3-letter ISO code (e.g. "usd"). |
regions(limit: Int = 50, offset: Int = 0, filter: RegionFilterInput): RegionConnection! | Public (cached · 30m) | List commerce regions with countries, currencies, and enabled providers. |
region(id: ID!): Region | Public (cached · 30m) | Fetch a region by ID. |
siteSettings: SiteSettings! | Public (cached · 1m) | Fetch storefront CMS brand theme, hero sliders, navigation menus, and SEO settings. |
promotions(limit: Int = 50, offset: Int = 0, filter: PromotionFilterInput): PromotionConnection! | Admin / Active Public | List promotions and application methods. |
promotion(id: ID!): Promotion | Admin / Active Public | Fetch a promotion by ID. |
campaigns(limit: Int = 50, offset: Int = 0, filter: CampaignFilterInput): CampaignConnection! | Store Admin | List marketing campaigns and budgets. |
campaign(id: ID!): Campaign | Store Admin | Fetch a marketing campaign by ID. |
Carts, Verification, Shipping & Payments (8)
| Query Signature | Access | Description |
|---|---|---|
cart(id: ID!): Cart | Cart Holder / Customer | Fetch a cart with line items, taxes, promotions, B2B approvals, and totals. |
activeCustomerCart: Cart | Authenticated Customer | Retrieve the caller's most recent uncompleted cart. |
cartIdrabbitStatus(cart_id: ID!): CartIdrabbitStatus! | Cart Holder / Customer | Inspect pre-checkout ID Rabbit age (21+) & identity verification state for a cart. |
shippingOptions(cart_id: ID!, is_return: Boolean, limit: Int = 50, offset: Int = 0): ShippingOptionConnection! | Cart Holder / Customer | List eligible outbound or return shipping options for a cart. |
calculateShippingOption(shipping_option_id: ID!, cart_id: ID!, data: JSON): CalculatedShippingOption! | Cart Holder / Customer | Quote live carrier pricing for a calculated shipping option. |
paymentCollection(id: ID!): PaymentCollection | Owner / Store Admin | Fetch a payment collection with sessions and payments. |
paymentProviders(region_id: ID!, limit: Int = 50, offset: Int = 0): PaymentProviderConnection! | Public | List active payment providers & public client SDK configs for a region. |
authorizenetConfig: AuthorizenetPublicConfig! | Public | Public Authorize.Net Accept.js credentials (api_login_id, public_client_key, environment). |
Identity, Customers, Orders & Returns (10)
| Query Signature | Access | Description |
|---|---|---|
authStatus: AuthStatus! | Public (never cached) | Inspect resolved authentication state (authenticated, actor_type, user, customer). |
me: User | Store Admin | Fetch the currently authenticated store admin user. |
customer(id: ID): Customer | Customer / Store Admin | Fetch authenticated customer when id is omitted, or customer by id (self/admin). |
customers(limit: Int = 50, offset: Int = 0, filter: CustomerFilterInput, order: CustomerOrderInput): CustomerConnection! | Store Admin | List and search customer accounts. |
orders(limit: Int = 20, offset: Int = 0, filter: OrderFilterInput, order: OrderOrderInput): OrderConnection! | Customer / B2B Admin / Store Admin | List orders (automatically scoped to customer, B2B company, or store). |
order(id: ID!): Order | Owner / B2B Admin / Store Admin | Fetch a single order with items, fulfillments, summary, and transactions. |
returns(limit: Int = 20, offset: Int = 0, filter: ReturnFilterInput): ReturnConnection! | Customer / Store Admin | List RMA order returns. |
return(id: ID!): Return | Owner / B2B Admin / Store Admin | Fetch a single order return by ID. |
returnReasons(limit: Int = 50, offset: Int = 0, filter: ReturnReasonFilterInput): ReturnReasonConnection! | Public | List customer return reasons. |
returnReason(id: ID!): ReturnReason | Public | Fetch a return reason by ID. |
B2B Wholesale (Companies, Quotes & Approvals) (6)
| Query Signature | Access | Description |
|---|---|---|
myCompany: Company | Authenticated Customer | Fetch the B2B Company of the authenticated buyer (null for B2C shoppers). |
company(id: ID!): Company | Company Member / Store Admin | Fetch a B2B company by ID. |
companies(limit: Int = 20, offset: Int = 0, filter: CompanyFilterInput, order: CompanyOrderInput): CompanyConnection! | B2B Customer / Store Admin | List B2B companies (scoped to caller's company unless Store Admin). |
quotes(limit: Int = 20, offset: Int = 0, filter: QuoteFilterInput): QuoteConnection! | Customer / Store Admin | List B2B RFQ quotes. |
quote(id: ID!): Quote | Owner / B2B Admin / Store Admin | Fetch a single B2B quote with draft_order, order_change, and messages. |
approvals(limit: Int = 20, offset: Int = 0, filter: ApprovalFilterInput): ApprovalConnection! | B2B Member / Store Admin | List B2B cart approval requests. |
Mutations (45)
Authentication & Customer Accounts (10)
| Mutation Signature | Access | Description |
|---|---|---|
login(email: String!, password: String!, actor_type: ActorType): AuthToken! | Public | Authenticate customer or user and issue a signed JWT bearer token. |
requestEmailOtp(email: String!, actor_type: ActorType): PasswordResetResult! | Public | Send a single-use 6-digit sign-in OTP code to the account's email address. |
verifyEmailOtp(email: String!, code: String!, actor_type: ActorType): AuthToken! | Public | Exchange a valid 6-digit email OTP code for a signed JWT bearer token. |
requestPasswordReset(email: String!, actor_type: ActorType): PasswordResetResult! | Public | Trigger password reset email for a customer or admin user. |
resetPassword(token: String!, password: String!, email: String, actor_type: ActorType): PasswordResetResult! | Public | Complete password reset using a reset token. |
createCustomer(input: CreateCustomerInput!): Customer! | Public | Register a B2C customer or B2B corporate buyer (when company_name is set). |
updateCustomer(id: ID, input: UpdateCustomerInput!): Customer! | Customer / Store Admin | Update customer profile fields. |
addCustomerAddress(input: CustomerAddressInput!): CustomerAddress! | Authenticated Customer | Add a saved shipping/billing address. |
updateCustomerAddress(address_id: ID!, input: CustomerAddressInput!): CustomerAddress! | Authenticated Customer | Update an existing customer address. |
deleteCustomerAddress(address_id: ID!): DeleteResult! | Authenticated Customer | Delete a saved customer address. |
Carts, Verification, Checkout & Payments (17)
| Mutation Signature | Access | Description |
|---|---|---|
createCart(input: CreateCartInput!): Cart! | Public / Customer | Create a new cart (auto-linked to authenticated customer & B2B company). |
updateCart(id: ID!, input: UpdateCartInput!): Cart! | Cart Holder / Customer | Update cart region, email, addresses, locale, or metadata. |
deleteCart(id: ID!): DeleteResult! | Cart Holder / Customer | Delete an uncompleted cart. |
addCartLineItem(cart_id: ID!, input: AddCartLineItemInput!): Cart! | Cart Holder / Customer | Add a variant and quantity to a cart. |
addCartLineItemsBulk(cart_id: ID!, items: [AddCartLineItemInput!]!): Cart! | Cart Holder / Customer | Add multiple variants to a cart atomically (ideal for B2B CSV/quick-order). |
updateCartLineItem(cart_id: ID!, line_id: ID!, input: UpdateCartLineItemInput!): Cart! | Cart Holder / Customer | Update line item quantity or metadata. |
removeCartLineItem(cart_id: ID!, line_id: ID!): Cart! | Cart Holder / Customer | Remove a line item from a cart. |
addCartShippingMethod(cart_id: ID!, input: AddCartShippingMethodInput!): Cart! | Cart Holder / Customer | Attach a ShippingOption to a cart. |
addCartPromotions(cart_id: ID!, promo_codes: [String!]!): Cart! | Cart Holder / Customer | Apply one or more promo codes to a cart. |
removeCartPromotions(cart_id: ID!, promo_codes: [String!]!): Cart! | Cart Holder / Customer | Remove promo codes from a cart. |
calculateCartTaxes(cart_id: ID!): Cart! | Cart Holder / Customer | Explicitly recalculate item and shipping tax lines. |
updateCartCustomer(cart_id: ID!): Cart! | Authenticated Customer | Bind an anonymous guest cart to the authenticated customer. |
createCartIdrabbitSession(cart_id: ID!, redirect_url: String): CartIdrabbitSessionResult! | Cart Holder / Customer | Create or resume an ID Rabbit hosted identity/21+ verification session for a cart. |
createPaymentCollection(cart_id: ID!): PaymentCollection! | Cart Holder / Customer | Create or retrieve the PaymentCollection for a cart. |
refreshPaymentCollection(cart_id: ID!): PaymentCollection! | Cart Holder / Customer | Sync payment collection amount after cart total changes. |
initializePaymentSession(payment_collection_id: ID!, input: InitializePaymentSessionInput!): PaymentCollection! | Cart Holder / Customer | Initialize a gateway PaymentSession (e.g. Stripe PaymentIntent, Authorize.Net). |
completeCart(cart_id: ID!): Order! | Cart Holder / Customer | Authorize payment, verify ID Rabbit & B2B approvals/limits, reserve stock, and place Order. |
Orders, Returns & Reviews (6)
| Mutation Signature | Access | Description |
|---|---|---|
requestOrderTransfer(order_id: ID!, description: String): Order! | Customer / Store Admin | Request transferring order ownership to another customer. |
acceptOrderTransfer(order_id: ID!, token: String!): Order! | Token Holder / Customer | Accept an order transfer using its verification token. |
declineOrderTransfer(order_id: ID!, token: String!): Order! | Token Holder / Customer | Decline a pending order transfer. |
cancelOrderTransfer(order_id: ID!): Order! | Requester / Store Admin | Cancel a pending order transfer request. |
requestReturn(order_id: ID!, items: [ReturnItemInput!]!, location_id: String, return_shipping: ReturnShippingInput, note: String, receive_now: Boolean): Return! | Owner / B2B Admin / Store Admin | Submit an RMA return request for order items. |
createReview(input: CreateReviewInput!): Review! | Public / Customer | Submit a customer product review (created in pending moderation status). |
B2B Companies, Employees, Quotes & Approvals (12)
| Mutation Signature | Access | Description |
|---|---|---|
requestQuote(cart_id: ID!): Quote! | Authenticated Customer | Convert an active cart into a negotiable B2B RFQ Quote. |
createQuoteMessage(quote_id: ID!, text: String!, item_id: String): QuoteMessage! | Owner / B2B Admin / Store Admin | Post a message on a quote negotiation thread. |
acceptQuote(id: ID!): Quote! | Owner / B2B Company Admin | Accept a merchant's quoted pricing (pending_customer → accepted). |
rejectQuote(id: ID!): Quote! | Owner / B2B Admin / Store Admin | Reject a B2B quote proposal. |
inviteEmployee(input: InviteEmployeeInput!): Employee! | B2B Company Admin / Store Admin | Invite an employee to a B2B company with role & spending limit. |
updateEmployee(id: ID!, input: UpdateEmployeeInput!): Employee! | B2B Company Admin / Store Admin | Update an employee's spending_limit or is_admin flag. |
removeEmployee(id: ID!): DeleteResult! | B2B Company Admin / Store Admin | Remove an employee from a B2B company. |
updateCompany(id: ID, input: UpdateCompanyInput!): Company! | B2B Company Admin / Store Admin | Update B2B company details and spending-limit reset cadence. |
updateCompanyStatus(id: ID!, status: CompanyStatus!): Company! | Store Admin | Approve, reject, or set pending status on a B2B company. |
updateApprovalSettings(id: ID!, input: UpdateApprovalSettingsInput!): ApprovalSettings! | B2B Company Admin / Store Admin | Toggle requires_admin_approval and requires_sales_manager_approval. |
createCartApprovals(cart_id: ID!): Cart! | Authenticated B2B Customer | Submit a cart for required B2B admin / sales manager approvals. |
updateApproval(id: ID!, status: ApprovalStatusType!): Approval! | B2B Admin / Store Admin | Approve or reject a pending B2B cart Approval. |