makers.bolt.fun icon indicating copy to clipboard operation
makers.bolt.fun copied to clipboard

Using cursor-based pagination for feed posts api

Open MTG2000 opened this issue 3 years ago • 2 comments

MTG2000 avatar Oct 12 '22 13:10 MTG2000

If someone creates a new post while someone else is scrolling through the feed, then the skip parameter for the feed pagination query will be off by 1. Meaning that the item fetched at the end of a page, will be fetched again at the beginning of the next page. So to solve this issue, we can use cursor based pagination

MTG2000 avatar Oct 12 '22 13:10 MTG2000

Great problem to have! People posting while others are scrolling 😄

johnsBeharry avatar Oct 13 '22 06:10 johnsBeharry