GraphqlQueryError: Access Denied For Products Field

Topic summary

Access denied error when querying the Products field via the Shopify Admin GraphQL API. The author attempts a basic query (products { id, title }) to fetch two products, but receives a permission issue. A code snippet of the GraphQL call is provided and is central to understanding the problem.

Context: Using Shopify CLI 3.56.1. The app’s scopes were adjusted in shopify.app.toml, and deployment was done with npm run deploy (since shopify app config push is deprecated), but the issue persists.

Key need: Clarification on correct permissions/scopes and how to properly apply them so the app can access products via GraphQL.

Status: No solution or next steps confirmed yet; the thread remains unresolved with unanswered questions about required scopes and deployment/reauthorization steps.

Summarized with AI on January 5. AI used: gpt-5.

Hi,

I’ve been trying to fetch my products details using graphQL but unfortunately encoutered a permission issue.

I tried to adjust my scopes in the shopify.app.toml and run the command

npm run deploy

since

shopify app config push

is no longer use, but it seems like the issue still not fixed.

I’m using a shopify CLI 3.56.1 version BTW.

Here’s my basic query:

const storeProductsInfo = await admin.graphql(
    `#graphql
      query {
        products(first:2) {
          nodes {
            id
            title
          }
        }
      }`,
      {
        variables: {}
      }
    );

Thanks in advance.