Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I get both data { } and extensions { } back in responses from the Admin GraphQL API but just data { } and no extensions { } are being returned by the Partner GraphQL API. Is there a header or query option that needs to be set perhaps?
Solved! Go to the solution
This is an accepted solution.
Even the Partner API GraphiQL Explorer does not return extensions, so I guess it's not yet supported, making the Partner API relatively useless for now.
Forgot to say that adding 'X-GraphQL-Cost-Include-Fields': true to the request header made no difference.
This is an accepted solution.
Even the Partner API GraphiQL Explorer does not return extensions, so I guess it's not yet supported, making the Partner API relatively useless for now.
It used to work before, but not anymore for some reason. I don't see this documented anywhere. Even shopify-api-node library crashes because of this. It tries to read .extensions but doesn't find it.
Curiously, the demo version at https://shopify.dev/graphiql/admin-graphiql does show extensions, like this:
{
"data": {
"shop": {
"name": "graphql-admin"
}
},
"extensions": {
"cost": {
"requestedQueryCost": 1,
"actualQueryCost": 1,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 999,
"restoreRate": 50
}
}
}
}