How do I work around optimistic updates being overwritten when NextParam fetching in useInfiniteQuery? #6106
Unanswered
ckdals1108
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.
-
Hi, all
We're using useInfiniteQuery to fetch data and optimistic updates to modify cached data. If we fetch the data heavily and apply invalidate, we will be patching the data sequentially and it will take a long time to reflect.
So I'm trying to apply only optimistic updates without invalidate, but if I proceed with optimistic updates while patching additional data, the optimistic updates are applied and then overwritten by the old data when fetching is completed.
If anyone knows how to fix this, please share.
Beta Was this translation helpful? Give feedback.
All reactions