GraphQL Collection Query - Getting "Access denied for collections field."

Kris_Doyle
Shopify Partner
87 0 19

Hi All,

One of my users is triggering the execution of the following query:

{
  collections(first: 250, query: "collection_type:smart") {
    edges {
      node {
        id
        handle
        title
        productsCount
        sortOrder
        image {
          src
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
    }
  }
}

 

For some reason, this always results in the error "Access denied for collections field.

The weird thing is that it only happens with one specific user, and there's no indication in the error of why it's denied. I'm using online access so I'm guessing it has something to do with that users' permissions, but I'm not sure why they wouldn't be able to query collections. What am I missing? Is there a an admin setting that would allow a shop owner to deny access to collection read for one of their users?

0 Likes
Kris_Doyle
Shopify Partner
87 0 19

Anyone from Shopify (or anywhere else) have any idea why I'm getting access denied on the above query?

I'm now getting it with a second user but I have no idea what the problem is. The error message only says:
Server error [Access denied for collections field.]

Any assistance would be greatly appreciated, thanks!

0 Likes