Replies: 1 comment 11 replies
-
can you show an executable reproduction somewhere (e.g. codesandbox) that works with v3 and fails with v4? thanks. also, react version likely matters here. You're also not showing what the mutation is doing or where |
Beta Was this translation helpful? Give feedback.
11 replies
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.
-
We have upgraded to v4 today and it seems that we have some issues with the timing of data updating in queries. We got custom mutation wrappers that updated the queries of the same key using
setQueryData
.This is how the test looks: (using jest, msw)
Here, we simply add the entity to the cached query data on
onSuccess
of the mutation, but the test fails because the 2nd entity is missing.It was not failing on v3.
What I currently did was wait for the
dataUpdatdAt
to update, but it doesn't seem to be the best solution I guess.Is there something else we could do?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions