GraphQL Partner API

Solved
Username4
Tourist
5 1 4

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?

Accepted Solution (1)

Accepted Solutions
Username4
Tourist
5 1 4

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.

2021-01-30_132524.png

View solution in original post

Replies 4 (4)
Username4
Tourist
5 1 4

Forgot to say that adding   'X-GraphQL-Cost-Include-Fields': true   to the request header made no difference.

Username4
Tourist
5 1 4

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.

2021-01-30_132524.png

edvinaskilbausk
Tourist
4 0 1

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.

den232
Shopify Partner
98 1 25

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
}
}
}
}