GraphQL Access Denied

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,

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,

@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.