BUG: Incorrect content delivery API response

Iā€™ve been banging my head on this for a few hours and it has been extremely frustrating.

Out of nowhere, the API stopped delivering payloads from staging environments as well as draft records. What appears to be happening is a silent fallback to published, production records (or an incorrect CDN cache hit).

Iā€™ve isolated the problem to having a payload that includes null values for BOTH ā€œvariablesā€ and ā€œoperationNameā€. Removing either key from the payload fixes the problem.

Unfortunately, the client Iā€™m using automatically appends these keys, so Iā€™m stuck until this is fixed.

Example (failing, returning data from the primary environment):

POST https://graphql.datocms.com/ HTTP/1.1
Authorization: REDACTED
Content-Type: application/json
Accept: application/json
X-Environment: development
X-Include-Drafts: true

{ā€œqueryā€:"{ _site { globalSeo { siteName } } }",ā€œvariablesā€:null,ā€œoperationNameā€:null}

Example (succeeding, returning data from the development environment):

POST https://graphql.datocms.com/ HTTP/1.1
Authorization: REDACTED
Content-Type: application/json
Accept: application/json
X-Environment: development
X-Include-Drafts: true

{ā€œqueryā€:"{ _site { globalSeo { siteName } } }"}

Please help.

Hello, we have found a small issue that could explain this behaviour. Could you please retry and see if the problem is solved? If thatā€™s not the case, please send us a mail at support@datocms.com with the requests complete with token/project ID, thanks!

It seems to be working now, thank you.