Describe the bug
Hi!
I'm currently implementing offline support for my application using the v4 version but I'm having a problem with the mutation cache.
It seems that in the hydration.js file, the mutationFn is returned in the dehydrateMutation function. This is causing the warning No mutationFn found.
Your minimal, reproducible example
Not able
Steps to reproduce
- Open your application while online
- Go offline and do some mutation that's supposed to be persisted and resumed when going online
- Close your application fully
- Go back online
- Open your application again
- Call
queryClient.resumePausedMutations(); inside the onSuccess function of the PersistQueryClientProvider
- Warning is shown, and the mutation is not executed.
Expected behavior
I expect my mutation to be cached correctly, and I expect the mutation function to be executed when resumed.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
iOS, Android
react-query version
4.0.0-beta.5
TypeScript version
No response
Additional context
No response
Describe the bug
Hi!
I'm currently implementing offline support for my application using the v4 version but I'm having a problem with the mutation cache.
It seems that in the
hydration.jsfile, themutationFnis returned in thedehydrateMutationfunction. This is causing the warningNo mutationFn found.Your minimal, reproducible example
Not able
Steps to reproduce
queryClient.resumePausedMutations();inside theonSuccessfunction of thePersistQueryClientProviderExpected behavior
I expect my mutation to be cached correctly, and I expect the mutation function to be executed when resumed.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
iOS, Android
react-query version
4.0.0-beta.5
TypeScript version
No response
Additional context
No response