Home / Companies / Apollo / Blog / Post Details
Content Deep Dive

Tutorial: Pagination

Blog post from Apollo

Post Details
Company
Date Published
Author
Ramya Nagarajan
Word Count
1,963
Company Posts That Month
8
Language
English
Hacker News Points
-
Post removed?
No
Summary

This tutorial covers the implementation of cursor-based pagination in a React + GraphQL application. The server's schema is updated to expose an API for loading smaller chunks of data, and the client-side code is modified to use this new API. A new resolver is added to fetch messages from the server using cursors, which allows the client to load only a page's worth of data at once. The Apollo Client cache is also updated to handle the new message feed structure. Finally, a `fetchMore` function is implemented to load older messages when the "Load Older Messages" button is clicked, demonstrating cursor-based pagination in practice.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.