You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using useMutationLoading to check wether or not the mutation is still in a "loading" state, the ref returns true in the onDone hook of that mutation.
Example:
constloading=useMutationLoading()const{ mutate, onDone }=useMutation(SOME_MUTATION)constdoThing=async()=>mutate({input: {id: '1',state: 'waiting'}})onDone(()=>{console.log(loading.value)// returns true, but should be false, since the mutation is already done.})doThing()
To Reproduce
Steps to reproduce the behavior:
See above example
Expected behavior useMutationLoading to return false in the onDone hook.
Describe the bug
When using
useMutationLoading
to check wether or not the mutation is still in a "loading" state, the ref returnstrue
in the onDone hook of that mutation.Example:
To Reproduce
Steps to reproduce the behavior:
See above example
Expected behavior
useMutationLoading
to return false in theonDone
hook.Versions
vue: 3.2.36
vue-apollo: 4.0.0-alpha.16
@apollo/client: 3.5.10
The text was updated successfully, but these errors were encountered: