GraphQL is an intuitive query language that helps you define the response data of your GET API calls. For example, you can fetch the values of the Title and Description fields of entries, instead of the values of all fields.
It also helps you fetch data of referenced and multiple content types.
You can structure the response according to your technical requirements and use cases. If you haven’t worked with GraphQL before, we recommend reading the following resources:
Contentstack supports fetching content through GraphQL. Using our GraphQL Content Delivery APIs, you can fetch entries and assets as well as make image transformation API requests.
This means that you can create syntaxes to customize the responses of your API calls, to get precisely the data you want. The support for GraphQL is currently in Alpha.
So, for example, you can fetch data of only the fields that you want (such as Title and Description) of entries, instead of data of all fields.
You can also fetch data of multiple or referenced content types in a single request body. Consequently, it helps you retrieve more relevant data in fewer calls.
Read through our API Reference documentation to understand the different operators that are available for use with Contentstack GraphQL API.
Note: The Contentstack GraphQL API is currently available in Alpha version. We will be releasing the Beta version very soon. To learn more, refer the Contentstack GraphQL API documentation.
Most of our Content Delivery SDKs support GraphQL queries. Click the links below to understand how to use the GraphQL queries with our SDKs:
You can also refer to our SDK-specific example apps to get started with Contentstack GraphQL queries. Clone these apps and try out the APIs to get a first-hand experience of our GraphQL queries.