How to set env sandbox through axios

Hi there,
Currently we are fetching GQL through the axios, but in the new Update, we can not use the url like https://graphql.datocms.com/environments/my-sandbox anymore.

Instead we need to set X-Environment, Iโ€™d like to ask if the X-Environment should be set in the header like the example code below or where I can set the Env?
Thanks a lot!

      response = await axios.request({
        method: 'post',
        url: 'https://graphql.datocms.com',
        headers: {
          'Content-Type': 'application/json',
          Accept: 'application/json',
          Authorization: `Bearer ${token}`,
          'X-Environment': 'my-sandbox'
        },
        data: JSON.stringify({ query }),
      });

Hello @jeff.f.chen

Exactly the way you specified :slight_smile:
Just to add here: we are still maintaining the https://graphql.datocms.com/environments/my-sandbox endpoint and it will still be able to be used, however we do recommend switching over to the header way of specifying it, as we added more endpoint parameters through the headers that canโ€™t be specified just through the URL parameters.

Thanks for the reply!