Swell's GraphQL server provides allows you to implement frontend features like displaying products, managing carts, and applying discounts.

The GraphQL API is in an experimental alpha state and has multiple limitations detailed below. We intend to release a new version in the future with an improved implementation, but do not have a development timeframe. The current API will remain available, however features and bug fixes will not be prioritized.

  • Pre-load storefront pages by fetching specific products, categories, store settings, nav menus, and custom content ahead of time
  • Create, recover, and update accounts
  • Manage changes and statuses of shopping carts
  • Authenticate customers and allow them to edit account details, orders, and subscriptions
  • Format prices in localized currencies
  • Does not support nested queries
  • Does not return records from the content model namespace in results unless they have published: true
  • Does not support custom input arguments for client-side field editing
  • Does not return saved customer cards and addresses
  • Cannot render payment elements or tokenize cards, as this requires insertion of secure DOM elements
  • Cannot update cart email for guest checkout flows
  • Cannot recover abandoned carts

Swell offers a GraphQL playground to test and optimize your queries. To use it, login to your dashboard and navigate directly to `https://<your_id>.swell.store/playground`.

Start by adding your public key to the HTTP Headers section.

Authorization header
  "Authorization": "pk_test..."