---
title: "JSS GraphQL API"
slug: "jss-graphql-api"
abstract: "Learn about the infrastructure for using Sitecore GraphQL endpoints from JSS apps."
---
# JSS GraphQL API

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:

- Layout data, [using the GraphQL Layout Service](https://doc.sitecore.com/sai/en/developers/jss/22/jss-sai/fetch-layout-data-with-the-jss-graphql-layout-service.html "Fetch layout data with the JSS GraphQL Layout Service") provided by the [JSS Layout API](https://doc.sitecore.com/sai/en/developers/jss/22/jss-sai/jss-layout-api.html "JSS Layout API").
- Dictionary data, [using the GraphQL Dictionary Service](https://doc.sitecore.com/sai/en/developers/jss/22/jss-sai/fetch-dictionary-data-with-the-jss-graphql-dictionary-service.html "Fetch dictionary data with the JSS GraphQL Dictionary Service") provided by the [JSS Dictionary API](https://doc.sitecore.com/sai/en/developers/jss/22/jss-sai/jss-dictionary-api.html "JSS Dictionary API").

If you are using JSS for Next.js, the sample application leverages the [GraphQL Sitemap Service](https://doc.sitecore.com/xp/en/developers/hd/22/sitecore-headless-development/preparing-the-list-of-pages-for-static-generation-or-export-in-jss-next-js-apps.html) 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:

- The [Sitecore Experience Edge for XM](https://doc.sitecore.com/xp/en/developers/hd/22/sitecore-headless-development/sitecore-experience-edge-for-xm.html) GraphQL endpoint. It comes with a read-only GraphQL schema designed to accommodate common front-end use cases for headless Sitecore development. Read about the [Experience Edge schema](https://doc.sitecore.com/xmc/en/developers/xm-cloud/en/the-experience-edge-schema.html).
- [Sitecore Edge Preview GraphQL endpoint provided by Headless Services](https://doc.sitecore.com/xmc/en/developers/xm-cloud/en/the-preview-graphql-endpoint.html), an implementation of a GraphQL server on top of Sitecore that mirrors the Experience Edge schema.

## 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](https://doc.sitecore.com/xmc/en/developers/xm-cloud/en/the-preview-graphql-endpoint.html).

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.