Pagination cursor becomes invalid when query sort order is altered
0 reputation · 02 Feb 2022, 14:50 UTC
Current behavior shows that a pagination cursor returned by a Paginate call is tied to the exact sort order defined in the query. When the sort order is modified—such as changing the field or direction—the previously returned 'after' cursor no longer points to a valid position in the new ordering, causing subsequent page requests to fail or return incomplete results.
The precise goal is to determine whether FaunaDB provides a built‑in mechanism to preserve pagination state across sort order changes, and if not, how clients should reliably resume pagination after such a modification.
Key questions include: how does FaunaDB treat cursor validity when the sort order changes? Is there an API‑level reset or refresh operation for pagination cursors? What client‑side handling is required to maintain continuity without data loss?