Shopify GraphQL Query Generator

Describe what data you need in plain English and get an Admin API query or mutation, with pagination and cost notes.

Describe the result you need. AI will set up the tool and ask for any missing details.

Configure with AI

Enter to submit · Shift + Enter for a new line

Sent to AI. Leave out passwords and private customer data.

Your brief

These form details are sent to our AI provider when you generate. Review the result before publishing.

The version, pagination and cost, handled for you

PartWhat the generator does
Endpointhttps://{shop}.myshopify.com/admin/api/2026-07/graphql.json, noted as the version current when this was written, since Shopify releases a new one every quarter
PaginationAdds pageInfo { hasNextPage endCursor } and first/after arguments whenever more than 250 results are possible (250 is the per-page maximum)
CostExplains what to expect back in extensions.cost: requestedQueryCost, actualQueryCost and a throttleStatus you can read your remaining budget from

Reading the cost you get back

Every response carries extensions.cost.throttleStatus, with maximumAvailable (your bucket size), currentlyAvailable (what's left right now) and restoreRate (points refilled per second). Standard plans get a 100 point/second bucket: burst usage is fine as long as your average stays under that rate, and any single query is capped at 1000 points.

Using the query

  1. 01

    Where to run it

    Shopify's GraphiQL app for a quick test against your own store, or inside a private/custom app's server-side code for anything you'll run repeatedly.

  2. 02

    Check the field names

    Any field flagged with a verify comment should be checked against the current Admin API reference before you rely on it.

  3. 03

    Mutations

    Always read the userErrors array back: Shopify returns validation failures there instead of throwing an error.

Questions people ask

What API version does the query use?

2026-07, the version current when this tool was last reviewed. Shopify ships a new dated version every quarter; swap in whichever is current at shopify.dev if this one has aged.

How do I page through more than 250 results?

Pick More than 250 results, needs pagination. The query includes pageInfo and repeats with after set to the previous page's endCursor until hasNextPage is false.

Why did my query get throttled?

Its cost exceeded your currently available points. Check extensions.cost.throttleStatus in the response and either simplify the query or wait for the bucket to refill at its restoreRate.

Can this write a mutation, not just read data?

Yes, pick Mutation (create or change data) and describe the change; the generated code selects userErrors so you can catch validation problems.

I need this for Shopify Flow's Run code action instead.

Use the Shopify Flow Run code generator: it queries Flow's own workflow data, not the Admin API.

Want this builtinto your store?

I'm Emmanuel, a Shopify and WooCommerce developer. If this tool pointed at something you'd rather have fixed for you (a faster store, cleaner product data, a migration, a custom feature), send me a note.

Emmanuel Asika

Emmanuel Asika

Shopify & WooCommerce developer, Dublin

I build and fix online stores: new builds, migrations, speed, SEO and the custom bits apps can't do.

hello@emmanuelasika.com