Was this page helpful?

Getting Started with GraphQL Content API

GraphQL Content API

GraphQL is a is a flexible data query language that allows you to define API call responses to match your use case and technical needs (and much more). If you are new to the technology, here are some great educational resources to get you up to speed:

GraphQL Content API supports the Content Delivery API (CDA) and the Content Preview API (CPA) offering a fully functional equivalent to the REST implementation of the two APIs. It provides each space with a GraphQL schema based on its content types. The schema gets automatically regenerated every time these content types are updated. GraphQL endpoint filtering capabilities, schema generation process, and error codes are explained in the Reference guide.

The GraphQL Content API is currently available in beta version. Product features under the beta flag are in a stable state, but not covered under the SLAs. To learn about further additions and improvements to the GraphQL Content API, please consult the Contentful Changelog.

Disclaimer: Please note that the new GraphQL API beta is initially being rolled out on Large and Performance space types, with future plans to make it available more broadly.

Demo content

To help you explore the capabilities of the GraphQL API, a demo space populated with a sample content model and a complementary example application is set up:

You can query the demo space and examine its schema interactively, using the GraphiQL client embedded below (or working with it in a new tab).

Video Preview

To provide an easy starting point for your own projects, there is a step-by-step video tutorial that shows off GraphQL Content API in action and includes instructions on how to implement GraphQL endpoint in a vanilla Rect application.

The source code of the React app demoed in the video is available on Codesandbox.

Next steps

Now that you have covered the basics, learn how to implement GraphQL queries into your application by following language-specific starter guides:

For GraphQL API documentation and troubleshooting, please consult the reference guide:

To share your thoughts, ideas, and feedback use the feedback button or connect with us on Slack.

Give feedback