Re:Building APIs: A Comparison Between Cursor and Offset Pag...
by andrewingram on Saturday April 17, 2021 @11:11AM
(#26844805)
I built a utility for Graphene + Django to do it properly with arbitrary sorts, though one does need to be careful about exposing sorts orders which aren’t backed by any indexes.
It's also sometimes called keyset pagination - there's a good article about that here: https://use-the-index-luke.com/no-offset
I implemented it in https://datasette.io - it's quite tricky to build if you want to support arbitrary sort orders.