/plushcap/analysis/hasura/cursor-offset-pagination-with-hasura-graphql

Cursor and Offset Pagination Techniques with Hasura GraphQL

What's this blog post about?

This post discusses different pagination techniques and types used in applications with Hasura GraphQL queries. Offset-based pagination is a popular technique where the client makes requests with limit (number of results) and offset (records to skip). However, it has performance issues when dealing with large datasets and may result in duplicate or missing items due to frequent data updates. Cursor/keyset pagination overcomes these limitations by returning a pointer to a specific record in the dataset, ensuring no duplicate results are fetched. The post also covers different pagination types such as numbered pagination, infinite scroll/load more, and limit in nested objects. Choosing the right approach for pagination depends on the use case and whether the data is frequently updated or not.

Company
Hasura

Date published
Nov. 25, 2019

Author(s)
Praveen Durairaju

Word count
1400

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.