graphql/graphql-pagination

Pagination Example

Fetch paginated posts

graphql
pagination
query

Command

curl -X POST http://localhost:4000/graphql -H 'Content-Type: application/json' -d '{"query":"{ posts(limit: 5, offset: 10) { id title } }"}'

Explanation

Retrieve a subset of results using limit and offset. Useful for paginated UI views.

Examples

Next page posts

{ posts(limit: 3, offset: 6) { id title } }