Infinite pagination can be problematic.
- Encourages endless scrolling
- Decreased performance
- Crawlers can easily slurp up data
- Can become a ripe target for AI
I'm very aware of this, and created a CursorToken pagination helper that enforces max result limits using signed cursor pagination tokens.
We're using this throughout Loops for various endpoints, and it works very well!
https://github.com/joinloops/loops-server/blob/main/app/Support/CursorToken.php