Can I have 2 different paginated queries on the same data set with Graphcache? (The second doesn't return data / additional data) #3792
Unanswered
FieryRider
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a query that returns a lot of data but on 1 of the components of my app I don't need all that data but I need it on the other component that isn't accessed very frequently. So my idea was to create 2 queries on the same data set but one of them (which is being used all the time) requesting a small portion of the data and the other requesting more data (that one is used very rarely). So this how my queries look like:
The problem I'm facing is that if I query all the "pages" of the first query and then I request the first 20 results of the second query URQL returns the cached data from the first query with all the results. Is there a way for the second query to know that not all the data is in the cache and either request the missing data page by page from the beginning and updating the cached entries or just keeping tracking of both queries separately?
Beta Was this translation helpful? Give feedback.
All reactions