2 way cursor pagination design
Hi!
If you were to implement a two-way cursor pagination with
next_cursor
and prev_cursor
for an API endpoint, how would you handle the case when both cursors were provided in the request?
1. Error message
2. Prioritize one of the 2 cursors4 Replies
do you need to use database cursors?
Yes, it is already implemented with EF. It's just a generic question and I cannot decide which approach is more convenient if the API is public, used by developers
well, it sounds like having both cursors is incorrect
so you'd want to return HTTP 400 plus an error message
Alright, thank you!