Skip to content

Shopify Dude Fix

Shopify GraphQL Pagination: Why Your Product Export Stops at 250 Records

Build complete product exports using cursors instead of assuming a single GraphQL response contains the catalog.

Quick answer: Read pageInfo.hasNextPage and endCursor, then request the next page with after.
On this page

Why this happens

GraphQL connections return bounded pages. A successful response can contain only the first portion of the catalog, and nested connections have their own pagination.

Implementation

Request product IDs and the fields needed by the export. Persist the cursor only after processing the page successfully. For large catalogs consider a bulk query instead of repeatedly paging through deeply nested data.

Example

query Products($after: String) {
 products(first: 250, after: $after) {
  nodes { id title }
  pageInfo { hasNextPage endCursor }
 }
}

Start with a null cursor. Continue while hasNextPage is true, passing endCursor into the next request. Deduplicate by ID and handle throttling before advancing the checkpoint.

Common misunderstanding: A product page containing 250 records does not establish that the shop contains exactly 250 products. Variant connections also need their own completeness checks.
How to test this:

  1. Test with more than 250 products
  2. compare unique IDs with an independent count
  3. interrupt and resume an export
  4. test products with many variants
  5. confirm no missing or duplicated IDs.
Sources and further reading: Shopify reference ยท Shopify documentation