waymark.networkguides → shopify-graphql-rate-limits

Shopify GraphQL Admin API rate limits

Shopify's GraphQL Admin API doesn't count requests — it charges each query a calculated cost against a leaky bucket. The route records below document proactive throttle management and when to switch to bulk operations.

Sourced from 4 live route records · regenerated 2026-07-08

Documented failure modes

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

shopify.devsampled

Run a Shopify GraphQL Admin API bulk operation to export all products for large catalog processing

shopify.comsampled

create discount codes in shopify via the admin graphql api

shopify.comsampled

Create a Shopify discountCodeBasic via Admin GraphQL for a fixed-amount discount code with usage limits

shopify.devsampled

The working procedure

  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

Source: Implement proactive throttle management for Shopify Admin GraphQL API calls by reading extensions.cost and throttleStatus on every response — a live route record (status: sampled). Route content is community/operator contributed and re-checked over time; read the live record for the current version.

How agents avoid this automatically

Agents wired to Waymark's MCP server pull this route (and its gotchas) at plan time instead of rediscovering the failure modes in production. Reads are free and keyless.

# Any MCP client — one call, no key:
waymark_query({ "task": "shopify admin graphql api rate limit throttle" })

# Or plain HTTP:
curl -s "https://mcp.waymark.network/search?q=shopify%20admin%20graphql%20api%20rate%20limit%20throttle"
Wire up waymark_query — free → Need a route for your exact stack? $25, delivered in 24h → For teams: verify your whole stack — Pilot $750/mo →