inference bureau
Answers from our docs and articlesesc to close
Try asking
Create an accountSign up

Staying under Shopify's GraphQL cost limits, store by store

How Shopify's GraphQL cost bucket works, why apps get THROTTLED during a sale, and how Apps paces Admin API calls against each store's bucket.

Key takeaways

  • Shopify meters the Admin GraphQL API per app and store: each query has a requested cost, the store's bucket must hold that much before it runs, and the bucket refills at a rate set by the store's plan.
  • Most throttling comes from background work: webhook handlers and syncs that fire in bursts, retry blindly, and use up the points a merchant in the admin needs.
  • Pacing before a call, from the throttleStatus Shopify returns, works better than retrying after one, and the reading has to be shared by every process that calls for the store.
  • Apps stores each store's last reading, makes background calls wait until half the bucket is free, and retries throttled calls up to five times for the wait Shopify implies.

Black Friday is when an app finds out how it handles Shopify's rate limits. Orders arrive in bursts, every one of them is an orders/create webhook, and every handler that calls the Admin API spends points from the same bucket the merchant's admin page is using. In a slow week none of this shows up.

This article covers how the Admin GraphQL API's cost limit works, the ways apps usually run into it, and how Apps paces calls for each store. Our guide to hosting a Shopify app lists rate limits as one piece among many. This is the long version.

How the cost bucket works

Shopify doesn't count GraphQL requests. It counts points. Each query has a requested cost, worked out from the fields you select before the query runs: scalars and enums cost 0, an object costs 1, a mutation costs 10, and a connection is sized by its first or last argument. So asking for products(first: 250) with a nested variants(first: 100) gets expensive fast. A single query can't request more than 1,000 points on any plan.

Each app and store pair has a bucket of points. Before a query runs, the bucket must hold its requested cost. Afterwards, Shopify works out the actual cost from what came back and refunds the difference. A query that asks for 250 products and finds 12 is charged for 12.

The bucket refills at a restore rate set by the store's plan. Shopify's rate limit page, as we read it on October 23, 2026, lists:

PlanRestore rate
Standard100 points a second
Advanced Shopify200 points a second
Shopify Plus1,000 points a second
Shopify for enterprise (Commerce Components)2,000 points a second

The bucket's size also depends on the plan, but the page doesn't list it, and its own example response still shows a 1,000-point bucket restoring 50 a second. So don't hardcode either number. Every response reports both under extensions.cost (the values here are illustrative):

{
  "extensions": {
    "cost": {
      "requestedQueryCost": 252,
      "actualQueryCost": 14,
      "throttleStatus": { "maximumAvailable": 1000, "currentlyAvailable": 986, "restoreRate": 100 }
    }
  }
}

To see which fields make a query expensive, send the Shopify-GraphQL-Cost-Debug: 1 header and the response breaks the cost down by field.

When the bucket can't cover the requested cost, the query doesn't run. The response carries an error whose extensions.code is THROTTLED, and the throttleStatus tells you how far short you are.

The failures that show up in a sale

THROTTLED treated as an ordinary error

The most common bug is a handler that treats any error alike and lets the queue retry at once. The retry is throttled too, and so is the next, and the job ends up failed for a reason that would have cleared itself in two seconds. A throttled call needs its own path: wait, then try again.

Waiting by guesswork

A fixed one-second sleep is better than nothing, and it's what Shopify suggests as a fallback. But the response already says how long to wait. If a query requested 300 points, the bucket holds 120 and the restore rate is 100, the points arrive in 1.8 seconds:

const wait = (requestedQueryCost - currentlyAvailable) / restoreRate * 1000; // ms

Better still is to wait before the call. Keep the last throttleStatus you saw, add what has refilled since then, and hold the call until the bucket can cover it. That turns most throttled answers into short pauses you planned for.

One reading per process

Pacing only works if everything calling for a store shares the reading. A web process, two queue workers and a cron job that each track the bucket on their own will each think it's full, and together they'll empty it. The reading belongs somewhere every process can see, keyed by store.

Background work starving the merchant

Webhook handlers, syncs and backfills will use the whole bucket if nothing stops them. Then the merchant opens your embedded admin and its first query is throttled. Interactive requests need a reserve that background work leaves alone.

One big store holding up the rest

Buckets are per store, so a big store can't spend a small store's points. It can still hold up the small one in your own queue. If a worker sleeps through one store's throttle while jobs for other stores wait behind it, a Plus store's flash sale delays every other store's webhooks. Limit how many jobs run for one store at a time, so a throttled store waits in its own lane.

Black Friday bursts

During a sale, all of these happen together. Order webhooks arrive faster than the bucket refills, and handlers that fetch more than the payload carries (an order's metafields, a customer's tags) spend points on every order. Before the sale, check which handlers make Admin API calls, whether the payload already has what they need, and whether a filter could stop the webhook being sent at all.

How Apps paces each store

Every Admin API call from an app goes through Inference Bureau, which adds the store's token and does the pacing, so your code doesn't track the bucket.

  • One reading per store. Each response's throttleStatus is stored on the store's install, so jobs, webhooks and page requests on any instance pace against the same budget. Before a call, the stored reading is topped up by the restore rate for the time since it was taken.
  • Background work leaves half. Actions run by jobs, webhooks and schedules, and the Shopify sync itself, wait before each call until half the store's bucket is free. Requests from the embedded admin only wait until there's room for an ordinary query, about 50 points. So a merchant clicking around during a backfill still gets answers.
  • Retries for as long as Shopify says. A throttled call is retried after its Retry-After, or after the time the missing points take at the restore rate, or with a backoff when Shopify gives neither, up to five times. Background calls wait up to 60 seconds in all, and request calls up to 8. Logs shows the retries and the wait on the call's event.
  • Queries sized to fit. The sync's page sizes keep each query under the 1,000-point limit. When a model would take more than 100 pages, about 1,000 products or orders, it's listed with Shopify's bulk operations instead, which don't use the store's bucket at all.

A call still throttled after its wait throws ShopifyError with throttled set. Inside a job, that fails the attempt, and the job is retried after 15 seconds, then 30, doubling up to an hour. For your own routes, createShopifyClient takes the same priority:

import { createShopifyClient, ShopifyError } from "@inferencebureau/apps-sdk";

/** Work nobody waits on, such as an export: it leaves half the store's bucket for the admin. */
export async function recentOrders(shop: string) {
  const shopify = createShopifyClient(shop, { priority: "background", maxRetries: 3 });
  try {
    return await shopify.graphql(`query Recent { orders(first: 50, reverse: true) { nodes { id name } } }`);
  } catch (e) {
    if (e instanceof ShopifyError && e.throttled) return null; // still throttled after the wait: try later
    throw e;
  }
}

Getting ready for Black Friday on Apps

A few settings make a sale go more smoothly:

  • Filter webhooks at Shopify. A webhook entry in settings.ib.ts takes a filter in Shopify's search syntax and includeFields, so orders you'd ignore never become jobs. { topic: "inventory_levels/update", action: "restock", filter: "available:<5" } queues only the low-stock ones.
  • One job per store. Give jobs you enqueue a concurrencyKey of the store's domain, so one store's throttled work waits in its own lane.
  • Read synced models first. If the app syncs products or orders, the record is usually already in your models, and reading it costs no Admin API points.
  • Keep fetch: "onWebhook" for metafields you need right away. Each one costs a call per webhook. Other metafields are refreshed by sync passes, in bulk on big stores.

After the weekend, search Logs for type = shopify and look at the calls with retries or a wait on them. They show which handlers spent the most time waiting.

Frequently asked questions

What is Shopify's GraphQL rate limit?

Shopify meters points, not requests. Each app and store pair has a bucket that refills at a rate set by the store's plan. As of October 23, 2026, shopify.dev lists 100 points a second on Standard, 200 on Advanced, 1,000 on Plus and 2,000 on Commerce Components. A single query can't request more than 1,000 points.

Why does Shopify return THROTTLED?

The store's bucket didn't hold the query's requested cost when it arrived. The query didn't run and cost nothing. The response's throttleStatus says how many points were available and how fast they come back, which tells you how long to wait.

What's the difference between requested and actual query cost?

The requested cost comes from the fields and page sizes you ask for, and it must be in the bucket before the query runs. The actual cost comes from what was returned, and Shopify refunds the difference afterwards.

Does Apps slow down my embedded admin while a sync runs?

It's designed not to. Sync passes and actions run by jobs, webhooks and schedules wait until half the store's bucket is free before each call, while requests from the admin only wait for room for an ordinary query.

One bill for your apps, your models and your reviews.

Host apps and functions next to your model traffic. Routing picks each turn's model by your quality floor, and Auditor reviews every pull request against your own rules.