Shopify · api · fg-0329

GraphQL Admin query fails with MAX_COST_EXCEEDED even though it returns only a few records

If you see Query cost is 2003, which exceeds the single query max cost limit (1000), the cause and the fix for Shopify are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Query cost is 2003, which exceeds the single query max cost limit (1000).extensions.code is MAX_COST_EXCEEDEDA products query with first: 250 and nested variants(first: 100) is rejected before it runs
Cause
Shopify prices a query by the most data it could return, so nested connections multiply their first values. The real result size does not matter for the up-front check.
Fix
Lower first on the outer and inner connections, page the inner connection separately, or switch to a bulk operation for full exports.
Apply
query { products(first: 50) { nodes { id title variants(first: 10) { nodes { id sku } } } } } # full catalog: bulkOperationRunQuery
Affected
GraphQL Admin API, all current versions, 1000 point single query limit
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun