3 ms·
> There is no way to skip pages. If the user wants page X, it needs to request pages from 1 to X. Huh? The client can ask the server to generate a new cursor,
by amelius 4y ago
> There is no way to skip pages. If the user wants page X, it needs to request pages from 1 to X.
Huh? The client can ask the server to generate a new cursor, any desired amount of items ahead in the list.
- dingleberry420 4y agoIf the server supports this, which they won't, because they don't want to support pagination.
- mypalmike 4y agoWith opaque cursors, how does a client specify "a desired amount"?
- amelius 4y agoYou just say "this cursor + 5 pages", for example.
- hombre_fatal 4y agoYou send `GET /items[?cursor=<cursor>]` to my server. I respond: [ "items": [ {...}, {...}, {...}, ... ], "next_cursor": "77963b7a" ] How do you request "this cursor + 5 pages"?
- amelius 4y agoGET /items?cursor=77963b7a&add_to_cursor=5pages
- ignaciochiazzo 4y agoI strongly suggest not doing this since the application will be implementing `offset` in that scenario. This is the same as having Page-based pagination but with a cursor that acts a filter/sorting blob.