Tags:
- Liquid
- Storefront GraphQL API
New pagination limits for Liquid & Storefront GraphQL API
What's changing
The Liquid and Storefront GraphQL API now limits pagination of arrays of objects to 25,000 items. This affects:
- For paginated GraphQL queries (using
first
,last
,before
,after
parameters), queries will now return an error when paginating past the 25,000th item in the array. - For uses of the
paginate
tag in Liquid, the last allowed page will be returned when paginating past the 25,000th item in the array. - Any query originating from Liquid or GraphQL for a count will now return a maximum of 25,001 (indicating "more than 25,000") for arrays with more items.
In addition to that:
- The maximum Liquid page size has been increased from 50 to 250 to match the Storefront GraphQL API limit.
The documentation for Liquid and API usage have been updated to reflect these limits.
Important: This change only affects the Liquid and Storefront GraphQL API. The Admin GraphQL API continues to support higher limits for merchant facing workflows. See recent changelogs to that effect here and here.
What you need to do
If your application, storefront, or Liquid theme paginates through more than 25,000 items:
- Add filters to views to help narrow down results before pagination. For example, filter by product type, price range, or availability.
- Update count handling to account for the 25,001 maximum return value and replace it with a human readable value like "More than 25,000 products available."
Was this section helpful?