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 }),
});