GraphQL Schema Updates

Authenticated customers can now access their active B2B company context through the Storefront GraphQL API.

Storefront GraphQL

  • Active company access: a new activeCompany field on the Customer type returns the shopper’s active company context through the new ActiveCompany type, or null when the shopper is not an authenticated customer. The ActiveCompany type exposes:
    • companyUser: the authenticated B2B company user, or null when the caller is not a company user, B2B is disabled, or the feature flag is off.
    • addresses: a paginated, filterable list of the company’s addresses.
    • orders: a paginated list of orders placed under the company. This field is an alpha preview and is not intended for production use.
  • Company order filtering and sorting: the new CompanyOrdersFiltersInput input filters company orders by search text, status labels, customer ID, company or subsidiary IDs, and created date, while the new OrdersSortInput enum sorts them by created date, total including tax, ID, placed-by name, reference, or status.
  • Orders collection info: a new collectionInfo field on the OrdersConnection type returns additional information about the orders collection.

For schema details, browse the Storefront GraphQL API reference.