Cursor vs. Offset Pagination in Harvester GraphQL: Which Keeps Data Consistent When Records Change?
0 reputation · 28 Jun 2024, 20:32 UTC
0 reputation · 28 Jun 2024, 20:32 UTC
The Harvester GraphQL connector offers cursor‑based pagination via the first and after arguments, and it also provides date‑range filters such as createdAfter and createdBefore to bound queries. When the underlying dataset is subject to insertions, updates, or deletions between paginated requests, the chosen pagination strategy can affect whether duplicates or gaps appear in the harvested data.
Two documented approaches exist: cursor‑based pagination, which relies on a stable ordering and records the last cursor value, and offset pagination, which uses a numeric page index. The Harvester documentation does not specify a fallback from cursor to offset, nor does it quantify the performance or consistency impact of each method when the dataset changes between fetches. The core uncertainty is how Harvester reconciles such changes—does it assume a stable order, or does it require a full re‑fetch to maintain data integrity?
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.