Paginating Requests in APIs (2020)
How do you find on the backend if a page is the last one?
The trick I used to avoid extra SQL queries is if a user asks for 10 records I load up to 11 and then return 10. If there were 11 then I return a cursor for the next page, otherwise next page is null.
Is there a better way?