2 ms·
GraphQL Cursor Connections Specification
- nonethewiser 3y ago"Cursor-based pagination is the most efficient method of paging and should always be used when possible." https://developers.facebook.com/docs/graph-api/results https://developers.facebook.com/docs/graph-api/results This is a nice spec for implementing cursor based pagination in GQL. My interest was piqued because I had heard of cursor based pagination but only had experience with limit/offset. I suspect maybe that is the case for others. I also just find the specification very clear and well done which makes it beautiful in a weird sort of way.
- mattbillenstein 3y agoI guess the question becomes, how do you actually implement this using something like postgres on the backend? You actually need to keep a transaction open to perhaps guarantee the results in the cursor are consistent with the results from the previous page?