Hi everyone,
I am looking into the returns management capabilities of the Admin GraphQL API. I am experimenting with various queries and mutations using the Shopify GraphiQL App.
I am using the unstable version of the API, since that is the only one supporting returns-related queries and mutations.
For a lot of the queries, I am getting “access denied” errors (samples below). It seems like the GraphiQL app does not have the correct scope assigned (write_returns for example). However, I can find no way to edit those scopes.
Note that this works for the API key I have generated to hit this endpoint using Postman/other apps. However, I need to edit GraphiQL’s permissions, so I can also get the schema and auto-fill feature.
Did anyone else encounter this/Knows a fix for it? Thanks.
Sample query:
{
returnableFulfillments (orderId: "gid://shopify/Order/1234") {
edges {
node {
id
}
}
}
}
Sample response:
{
"data": null,
"errors": [
{
"message": "Access denied for returnableFulfillments field.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"returnableFulfillments"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes"
}
}
],
"extensions": {
"cost": {
"requestedQueryCost": 2,
"actualQueryCost": 2,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 998,
"restoreRate": 50
}
}
}
}