GraphQL Access Denied

Tourist
5 0 2

I'm trying to query a specific collection by ID but keep getting access denied. The only query that actually works for me is 

 

const GET_SHOP = gql`
  query {
    shop {
      id
    }
  }
`

Here's the query I'm trying which works in the GraphiQL app but not in my embedded app:

 

 const GET_COLLECTION = gql`
   query getCollections($id: ID!) {
     collection(id: $id) {
       availablePublicationCount
     }
   }
 `

Any help would be greatly appreciated!

 

Thanks,

0 Likes
Highlighted
Shopify Staff
Shopify Staff
618 46 87

 

Hi @asibilia,

 

Does your app have read_collections scope? You can read about access scopes here: https://help.shopify.com/en/api/getting-started/authentication/oauth/scopes.

 

Cheers,

0 Likes
Highlighted
Tourist
5 0 2

@Busfox do you mean read_products? I don't see read_collections anywhere on that page. I have read_products and write_products access scopes.

0 Likes