Private App Permission issue / GraphQL "Access denied for orders field."

Highlighted
New Member
2 0 1

I am working on a private app, improvement require switching from RESTful API to GraphQL.

I did check on App's permission.
   draftOrders: "read and write"

 

Ref screen shot:  https://imgur.com/a/YpDrNPR


Request:

{
  shop{
    draftOrders(first: 20) {
      edges {
        node {
           id
         }
      }
   }
 }
}

 

Response:
{
"data": null,
"errors": [
{
"message": "Access denied for draftOrders field.",
"locations": [
{
"line": 4,
"column": 5
}
],
"path": [
"shop",
"draftOrders"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/docs/admin-api/access-scopes"
}
}
],
"extensions": {
"cost": {
"requestedQueryCost": 23,
"actualQueryCost": 3,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 997,
"restoreRate": 50
}
}
}
}

 

 

Please help...

0 Likes
Highlighted
New Member
2 0 1

I reinstall the "Shopify GraphiQL App". Problem solved..
I think I did forgot to set the Permission for "Shopify GraphiQL App"


Problem solved.