Partners

Product Updates

DatoCMS changelog for new features and general improvements
Content Delivery API
New headers to specify environment and preview mode
June 10th, 2022

To make some room for future improvements to the GraphQL CDA, we're changing the way you can request content coming from sandbox environments and access records in draft.

The following GraphQL endpoints are now deprecated:

http://graphql.datocms.com/preview
http://graphql.datocms.com/environments/:environment_name
http://graphql.datocms.com/environments/:environment_name/preview

In favor of these new headers:

  • X-Environment: to explicitly read data from a specific environment;

  • X-Include-Drafts: to access records at their latest version available, instead of the currently published one.

Please note that these deprecated GraphQL endpoints will continue to work indefinitely, but we strongly suggest to only use http://graphql.datocms.com/ as the GraphQL endpoint from now on. The documentation has been updated accordingly to reflect this change.