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/previewhttp://graphql.datocms.com/environments/:environment_namehttp://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.