Shopify · api · fg-0329
GraphQL Admin query fails with MAX_COST_EXCEEDED even though it returns only a few records
Query cost is 2003, which exceeds the single query max cost limit (1000).
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
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: bulkOperationRunQueryAffects: GraphQL Admin API, all current versions, 1000 point single query limit
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp