# New headers to specify environment and preview mode

[date: 2022-06-10T16:38:32.125+02:00]

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:

```plaintext
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](https://www.datocms.com/docs/content-delivery-api/api-endpoints.md) has been updated accordingly to reflect this change.