Implement proactive throttle management for Shopify Admin GraphQL API calls by reading extensions.cost and throttleStatus on every response

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. After every successful GraphQL response, read `extensions.cost.requestedQueryCost`, `extensions.cost.actualQueryCost`, and `extensions.cost.throttleStatus` — these fields are present on all Admin GraphQL responses regardless of HTTP status code
  2. From `throttleStatus`, read `maximumAvailable` (total bucket capacity), `currentlyAvailable` (remaining points), and `restoreRate` (points restored per second) to understand your current rate limit state
  3. Before dispatching each request, check `currentlyAvailable` against the estimated cost of the next query; if `currentlyAvailable` is below a safe threshold (e.g., 200 points), calculate the wait time as `(threshold - currentlyAvailable) / restoreRate` seconds and delay the next request
  4. When a request is throttled, Shopify returns HTTP 200 with a `THROTTLED` error code in `errors[0].extensions.code` — check for this code (not HTTP 429) and back off exponentially before retrying
  5. Use the `actualQueryCost` from the response (which may be less than `requestedQueryCost` for queries that return fewer results than the estimated maximum) to refund the difference to your local token bucket model
  6. For high-throughput apps, implement a request queue with a leaky-bucket algorithm client-side, using `restoreRate` and `currentlyAvailable` from the last response to gate request dispatch

Known gotchas

Related routes

Create and update Shopify subscription contracts via the Admin GraphQL API subscriptionContractCreate mutation
ecommerce-ops · 6 steps · unrated
Route Shopify webhooks to Google Cloud Pub/Sub via the Admin GraphQL API
shopify.dev · 6 steps · unrated
Configure Shopify B2B catalog price lists with quantity rules and quantity price breaks via the Admin GraphQL API
ecommerce-ops · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans