Content SDK GraphQL API
The SitecoreAI GraphQL API is a generic GraphQL service platform on top of SitecoreAI. It hosts your data and presents it through GraphQL queries. The API supports real-time data using GraphQL subscriptions.
GraphQL enables production-grade APIs to power your front-end applications. Compared to traditional REST APIs, GraphQL is significantly easier to maintain, far more easily discoverable and queryable (thanks to built-in GUI tools), more bandwidth-efficient, and more powerful.
The GraphQL endpoint
Content SDK applications use the Experience Edge GraphQL endpoint. It includes a read-only GraphQL schema designed to accommodate common front-end use cases for headless SitecoreAI development.
Data available for GraphQL querying
The Content SDK offers a suit of services for retrieving data via GraphQL, such as:
-
The Layout service - used to query the Layout API for layout-related data.
-
The Dictionary service - used to query the Dictionary API for localization and dictionary content.
-
Additional specialized services for fetching editor data, error pages, sitemaps, and so on.
The SitecoreClient class is the central point for interacting with SitecoreAI's headless APIs and services. It streamlines data access across all available GraphQL services.
This documentation includes various best practices for working with GraphQL. It also includes comprehensive guides to using integrated GraphQL and fetching component-level data with GraphQL.