Developer changelog

Subscribe to the changelog to stay up to date on recent changes to Shopify’s APIs and other developer products, as well as preview upcoming features and beta releases.

Get updates by RSS

Enhancements to pagination for GraphQL connections


In addition to edges, GraphQL connections now have a nodes field. When you only query node on edges, you can simplify the query.

For example:

{ connection { edges { node { fields } } }

can be simplified to:

{ connection { nodes { fields } } }

PageInfo has been expanded as well to include startCursor and endCursor.

When these fields are used in tandem, it can simplify the shape of return data for pagination.

Previous query format:

{ connection { edges { cursor node { fields } } pageInfo { hasNextPage } } }

Improved query format:

{ connection { nodes { fields } pageInfo { hasNextPage endCursor } } }