Access Denied Errors using the Shopify GraphiQL App

Highlighted
New Member
1 0 0

Hello there, I am running into Access Denied Errors using the Shopify GraphiQL app. I installed the app on 4/7/20.

 

I am trying to query for refunds on an order. This is the query I wish to perform:

query order {
  order(id: "id") {
    refunds {
      refundLineItems {
        edges {
          node {
            lineItem {
              id
            }
          }
        }
      }
    }
  }
}

However, I obviously need to obtain the ID for the order. To do so, I ran the following query:

query orders {
  orders(first: 50) {
    edges {
      node {
        id
      }
    }
  }
}

but I received 

{
  "data": null,
  "errors": [
    {
      "message": "access denied",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "orders"
      ]
    }
  ],
  "extensions": {
    "cost": {
      "requestedQueryCost": 52,
      "actualQueryCost": 2,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 998,
        "restoreRate": 50
      }
    }
  }
}

Furthermore, some other queries do work:

query products {
  products(first: 10) {
    edges {
      node {
        id
      }
    }
  }
}

and I did receive the expected response

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 129

Hey @miness ,

 

When you installed the GraphiQL App, did you ensure that you selected the read and write access scopes for "orders"? If not, then you will get the Access Denied Errors when you try to query for it.

 

You can uninstall GraphiQL App from you store and re-install it here (https://shopify-graphiql-app.shopifycloud.com/login) and make sure that you select all of the access scopes you need.

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes