:wave: hey i am thinking of implementing paginatio...
# apollo-kotlin
a
👋 hey i am thinking of implementing pagination using the new incubating cache artifacts. is there any good examples combining cache, pagination, and
watch
?
j
I think @bod had been looking at this as well?
m
The parent folder contains examples for various kinds of pagination (offset, cursor, relay, etc...)
a
i saw that. what i am trying to understand is , when I watch a query with pagination parameters (say a limit, offset), when I watch it, will it watch the entire set of data in the cache, or only the first x number of records?
m
It'll watch the entire set of data
That's the main goal actually. It does this by ignoring the pagination parameters in the cache key
So everything is "accumulated" in the same cache key
a
oh awesome . so my next follow up is, when I use something like androidx pagination, how do this change the equation? in the sense that we watch the entire set. but with androidx pagination, im guessing we just invalidate the source when the
watch
emits?
m
Right, excellent question for which I don't have an excellent answer...
a
ah i see. so using
query
still, but pulling from cache or network at will. interesting!