Pagination with Relative Cursors
Pagination with Relative Cursors - Shopify

Pagination with Relative Cursors - Shopify

8/12/2019

What this post added

This post introduces and advocates for the adoption of relative cursor pagination as a replacement for offset-based pagination in Shopify's APIs. It details the performance issues associated with large offsets, demonstrating with empirical data how query times increase exponentially. The post explains the mechanics of relative cursor pagination, including handling unique and non-unique sortable fields, and provides examples of how to implement it. It also discusses the challenges of rolling out this change across a large organization, the proposed solution involving standardized patterns and common code, and the migration strategy. The post highlights the performance benefits observed in early adoptions and sets a timeline for full deprecation of offset-based pagination.

Read the original post ↗