Check B1.9 · Adobe Commerce catalog over GraphQL

Let agents query your Adobe Commerce catalog over GraphQL

How the scanner tests whether a Magento or Adobe Commerce store answers an anonymous products query on /graphql over GET, what blocks it, and how to open it safely.

By · Updated · Markdown

Check 8 of 8 in Catalog exposure · 59 of 87 overall
Priority
Expected Weight 2. Expected of a well-run store and counted in the section score.
Readiness level
Not a level gate. It counts toward its section score.
Platform
Runs only when the scan recognises Adobe Commerce (Magento). On any other platform it is left out of the report and never scored.
The question
Can an agent query the Magento catalog over GraphQL without a token?
Runs after
B1.1. When a dependency fails, this check is skipped rather than guessed.
On this page

In short

Adobe Commerce and Magento Open Source ship a GraphQL endpoint at /graphql that answers catalog queries without a token. Adobe documents that queries can be sent with HTTP GET and that GET answers for products are cacheable. This check sends one small products query over GET and passes when products come back. It runs only on Adobe Commerce and Magento stores and carries weight 2, expected.

What this check looks at

GraphQL is a query language for APIs. The client sends one query that names exactly the fields it wants, and the server returns them as JSON. Adobe Commerce and Magento Open Source include a GraphQL API for storefronts. Its products query searches the catalog and returns product data such as name, SKU (the store's own product code) and URL key (the product's address slug).

Adobe's documentation says the GraphQL endpoint supports both GET and POST. Mutations, the requests that change data, must use POST. Only GET answers are cacheable, and Adobe lists the products, categories, cmsPage, route and storeConfig queries among those it caches. A catalog read over GET is the documented, cache-friendly way to ask.

The store also has a REST API. Anonymous access to catalog routes such as /V1/products is off by default. Adobe controls it under Stores, Configuration, Services, Magento Web API, Web API Security, with the setting Allow Anonymous Guest Access. This check does not test REST, and you do not need to change that setting.

Why it matters for AI agents

An agent asked to find a product needs the catalog as data. On Adobe Commerce, GraphQL gives it names, SKUs, prices and links in one request, without crawling theme pages.

When an agent cannot reach it, the cause is often a rule in front of the store: a firewall, a bot rule at the CDN (content delivery network, the caching layer in front of the site), a redirect or a robots.txt entry.

Passing shows that an anonymous catalog query works. It does not show that every product is complete, that prices are right, or that an agent can check out.

How the scanner decides

The check runs only when the platform detection check recognised Adobe Commerce or Magento Open Source. On other platforms it does not run and reports leave it out. A headless storefront (a separate front end that reads the store's data), such as one built with PWA Studio or Edge Delivery Services, may not show the signals detection looks for. Then the check does not run.

The scanner sends this query to /graphql with GET and Accept: application/json:

{products(search:"a",pageSize:1){total_count items{name sku url_key}}}

It asks for one product and reads data.products.items from the answer.

  • Pass: HTTP 200 with a data.products.items array and no errors. The report shows the number of matching products.
  • Warn: the answer carries products and also GraphQL errors. The query works, but something in the schema or an extension reports a problem.
  • Warn: the answer is GraphQL JSON with errors and no products. GraphQL is reachable, but it refuses the catalog query.
  • Warn: robots.txt disallows /graphql for the scanner's user agent. The scanner honours robots.txt, so it did not ask. Agents that honour robots.txt cannot use it either.
  • Fail: HTTP 401 or 403 without a GraphQL answer. Something refuses anonymous catalog reads.
  • Fail: an HTML page. A firewall rule, a bot challenge or a redirect sits in front of /graphql.
  • Fail: HTTP 404 or any other answer that is not GraphQL.
  • Skipped: HTTP 429, a gateway error (502, 503 or 504) or no response at all.

How to fix it

Start with the rules in front of the store, then look at the store itself.

Adobe Commerce and Magento Open Source

  • Check the CDN and web application firewall. Rules in Fastly, Cloudflare, Akamai or similar services often block or challenge /graphql for clients that are not browsers. Allow GET requests to /graphql from honest, identified clients, and keep rate limiting for abusive ones.
  • Check the web server and cache. An nginx or Varnish rule that denies GET on /graphql breaks the documented, cacheable path. Let GET answers for catalog queries be cached instead.
  • Review robots.txt. Under Content, Design, Configuration, open Search Engine Robots for your store view. Remove any rule that disallows /graphql for all agents.
  • Check extensions and disabled modules. An extension or a deployment that disables the GraphQL modules, such as Magento_GraphQl or Magento_CatalogGraphQl, removes the endpoint.
  • Keep mutations on POST and protected. Adobe requires POST for mutations. Opening GET for catalog queries does not open writes.
  • Leave anonymous REST access alone. It is a different, broader switch, and this check does not need it.

Verify it yourself

Send the same query with GET:

curl -s -G 'https://example.com/graphql' \
  -H 'Accept: application/json' \
  --data-urlencode 'query={products(search:"a",pageSize:1){total_count items{name sku url_key}}}'

A working endpoint prints JSON that starts with {"data":{"products":. To see only the status code and content type:

curl -s -G -o /dev/null -w '%{http_code} %{content_type}\n' 'https://example.com/graphql' \
  --data-urlencode 'query={products(search:"a",pageSize:1){total_count}}'

A 403 with text/html usually means a firewall or bot rule answered, not the store.

Common mistakes

  • Blocking /graphql at the CDN to stop scraping. It also hides the catalog from agents, and from your own headless front end if you add one later. Rate-limit instead.
  • Allowing only POST. Adobe documents GET for queries, and only GET answers can be cached. Blocking GET pushes clients to uncached POST requests.
  • Disallowing /graphql in robots.txt. Agents that honour robots.txt stop there.
  • Turning on anonymous REST access to fix this. It opens a broader set of routes and does not change the GraphQL result.

FAQ

Can Magento GraphQL queries be sent with GET?

Yes. Adobe's documentation says the GraphQL endpoint supports GET and POST. Mutations must use POST.

Do I need a token to query products on Adobe Commerce GraphQL?

No. Catalog queries such as products do not need a customer token. If the endpoint asks for one, a rule or an extension changed that.

Is it safe to allow GET on /graphql?

For queries, yes. GET cannot run mutations, and Adobe caches GET answers for catalog queries, which lowers the load on the store.

Does this check test the Magento REST API?

No. Anonymous REST access to routes such as /V1/products is off by default and controlled by a separate setting. The scanner does not test it.

Why does the check not run on my headless Adobe Commerce storefront?

A PWA Studio or Edge Delivery Services front end may not show the signals the scanner uses to recognise Adobe Commerce. When the platform is not recognised, platform-specific checks do not run.

The fix in one step

Keep Adobe Commerce's GraphQL endpoint open for read-only catalog queries over GET: remove firewall, CDN or robots.txt rules that block /graphql for anonymous clients, and let the full-page cache serve the GET answers.

Prompt for a coding agent

This Adobe Commerce / Magento store does not answer an anonymous catalog query on /graphql. Adobe documents that queries may be sent with GET and that GET answers for products and categories are cacheable, so read access is safe to allow. Check, in order: CDN and WAF rules (Fastly, Cloudflare, Akamai) that block or challenge /graphql for non-browser clients, nginx or Varnish configuration that denies GET on /graphql, robots.txt rules under Content > Design > Configuration > Search Engine Robots that disallow /graphql, and extensions or deployments that disable the GraphQL modules (Magento_GraphQl, Magento_CatalogGraphQl). Allow GET requests for queries, keep rate limiting for abusive clients, and leave mutations protected. Do not enable anonymous REST access for this. It is a different, broader switch. Verify with: curl -s 'https://<domain>/graphql?query=%7Bproducts(search:%22a%22,pageSize:1)%7Bitems%7Bname%20sku%7D%7D%7D' must return JSON with data.products.items and no errors array.

Sources and specifications

See how your store does

One scan runs every check in this knowledge base against your site and ends with a prioritised fix list.

Scan a store