Debug incorrect pagination results
Explain why offset pagination fails on live data and migrate to cursor-based pagination with a stable sort key. Covers query changes and API response shape.
Preview
Copy prompt
My paginated list endpoint is returning duplicate or missing records: [Describe the specific problem]. The query is: [Paste query]. Explain why offset-based pagination is unreliable on live data that is being inserted or deleted, and show how to migrate to cursor-based keyset pagination using a stable sort key. Update the query and document the change to the API request and response contract.
More
Debugging
Prompts
