Skip to content

Apollo Pagination - Implied Design #1312

Answered by JClackett
Rykuno asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! Thanks for the question, pagination is something we are still working on since Apollo client updated their recommended approach. To be honest, I'm not a huge fan of their proposed way though i do see the benefits. We will eventually update our way of doing it. For now we are still using the updateQuery method in the fetchMore function.

The paginate function is a simple utility that appends the latest page of data to the end of the list, it accepts a key which is the name of the field in which count and items are returned. It works together with the skip and take arguments.

There is an example in this repo inside packages/web/src/pages/admin/users.tsx

Let me know if this makes sense!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Rykuno
Comment options

Answer selected by Rykuno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants