Skip to content

relayPagination cache update on variable change #2142

Answered by kitten
Mass812 asked this question in Q&A
Discussion options

You must be logged in to vote

That's intentional because they're two separate lists. There are some pieces of information you can find on Relay pagination, but basically the intention is only to merge pages.

That said, you can try separating them. However, while you can do a lot of this logic locally, typically the mantra of GraphQL is for your schema to give your UI exactly what it needs, i.e. to make a list that behaves exactly as you need.

There are other approaches that you can try out for pagination if that doesn't work for you, but it obviously does require a bit of manual work, e.g. https://formidable.com/open-source/urql/docs/basics/ui-patterns/#infinite-scrolling

Replies: 1 comment 1 reply

Comment options

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

Answer selected by kitten
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