Skip to content
Wade Womersley

wade.one

wade womersley – york based software engineer

  • Home
  • 2026
  • October
  • 19
  • Pagination Needs a Stable Order Before It Needs a Clever Cursor

Pagination Needs a Stable Order Before It Needs a Clever Cursor

Posted on October 19, 2026 By
Programming

Pagination looks simple until the underlying list changes between requests. If you sort only by a value that several records share, or leave the order to whatever the database happens to return, moving to the next page can skip or repeat items. I would settle the ordering contract before choosing the pagination mechanism.

GitHub’s GraphQL pagination guide is a clear example of following an end cursor and checking whether another page exists. A cursor is useful navigation state, but it is not a magical snapshot of a changing dataset. The API still needs to explain what ordering and consistency a caller can rely on.

For an application list, I want a deterministic sort and a unique tie-breaker. If people change the filters or sort direction, the old cursor should not silently carry on with different assumptions. Page size, empty results and the end of the list also deserve ordinary, predictable behaviour. These are small details that become very visible when somebody is working through hundreds of records.

Offset pagination can be perfectly adequate for a bounded list. Cursor pagination can be a better fit elsewhere. Neither choice excuses an unstable order. Start with what “the next page” means to the user, then choose the simplest mechanism that can keep that promise.

Share:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit

Related

Comments

comments

Tags: apis graphql pagination

Post navigation

❮ Previous Post: USB-C Is a Connector, Not a Promise About the Cable

You may also like

News
Link Checker Update – Download Meta Data, Errors, Redirects as CSV
November 5, 2009
Ego-centric
Today’s musings
September 3, 2009
News
Windows 10 coming to Raspberry Pi 2 – free!
February 2, 2015
Programming
How I Decide When an API Needs Versioning
April 16, 2026
  • AI
  • artificial intelligence
  • Ego-centric
  • Events
  • Films
  • Food
  • Gaming
  • Gym
  • Hardware
  • Holidays
  • News
  • PHP
  • Programming
  • Random Stuff
  • Reviews
  • Science
  • SEO
  • Software
  • Software Engineer
  • Support
  • Uncategorized
  • Work

Copyright © 2026 wade.one.

Theme: Oceanly News Dark by ScriptsTown