JSS GraphQL API

Current version: 22.0

Sitecore JavaScript Rendering SDK (JSS) provides GraphQL services and clients to facilitate querying and updating data with GraphQL.

You can opt for using GraphQL when you set up your application with any of the Sitecore-provided tools for creating a JSS project.

Data available for GraphQL querying

You can fetch the following types of data using GraphQL:

If you are using JSS for Next.js, the sample application leverages the GraphQL Sitemap Service to fetch the list of site pages using the Sitecore GraphQL API when statically generating and exporting the Next.js app.

GraphQL endpoints

JSS applications can use the following GraphQL endpoints:

Configuration

If you created your JSS application with any of the Sitecore-provided tools for creating a JSS project and chose GraphQL as your data fetching method, the JSS services use the Sitecore Edge Preview GraphQL endpoint.

To change the GraphQL endpoint used by your application:

  • In the root directory of the JSS application, in the package.json file, in the config map, find and update the graphQLEndpointPath property.

Do you have some feedback for us?

If you have suggestions for improving this article,