-
Database
Add pagination to every list endpoint
Replaces unbounded fetch-everything queries with cursor or offset pagination before tables get big.
Free Prompt
What This Does / How This Helps
Puts real pagination on every list query in the app, with the pattern (cursor vs offset) matched to how the data behaves. SELECT everything works until it doesn't. With real data, unbounded queries get slower every day, then one day an endpoint fetching 40,000 rows takes down the page and the database connection with it. This always happens after launch, never before, because dev databases are tiny. The cursor-versus-offset distinction is the detail that keeps it working: offsets over a changing feed skip and repeat items as new rows arrive, which is why feeds get cursors and admin tables get page numbers.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).