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.

Start using DatoCMS today
According to Gartner 89% of companies plan to compete primarily on the basis of customer experience this year. Don't get caught unprepared.
  • No credit card
  • Easy setup
Subscribe to our newsletter! 📥
One update per month. All the latest news and sneak peeks directly in your inbox.
support@datocms.com ©2024 Dato srl, all rights reserved P.IVA 06969620480