How would one go about optimistically updating cache based on a paginated endpoint? #2968
Unanswered
LoyalPotato
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.
-
Hello,
Say you have an API that implements the same pagination structure as the one mentioned in the docs.
How would you perform an optimistic update if you don't know in which page the item you're optimistically updating is inserted on.
Since the queries cache based on the params would this even be possible?
For example:
I'm updating the item
{id: 105, name: "Foo"}
which is returned when I make a GET request to the API with page 5.How would I update the data for that page request.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions