Version: 2.10

GraphQL API

The API

Saleor is powered by a GraphQL API. GraphQL is a query language that allows clients to talk to an API server. Unlike REST, it gives the client control over how much or how little data they want to request about each object and allows relations within the object graph to be traversed easily.

To learn more about GraphQL language and its concepts, see the official GraphQL website.

The API endpoint is available at /graphql/ and requires queries to be submitted using HTTP POST method and the application/json content type.

Using the Saleor GraphQL API allows you to query and modify all of your shop’s data in an efficient and flexible manner. Our API provides both types of operations:

  • Public (related to the customers of your shop)
  • Private (related to the administration side)

Here's an example query to fetch the store's name:

GraphQL Example
Query Variables

GraphQL Playground

Saleor exposes an interactive GraphQL editor under /graphql/, allowing access to the API from your browser.

GraphQL Playground is an external interactive editor for your GraphQL queries. It is based on GraphQL and accessible through the web browser.

Using Playground is easy and intuitive with its sidebar navigation containing two tabs (Docs and Schema), listing all operations available in the API. The Playground allows you to quickly familiarize yourself with the API, perform example operations, and send your first queries.

Playground

To view and try out the Playground instance of Saleor's demo store, visit the Saleor Demo Playground.

For more information, visit the Playground GitHub page.