-
-
Notifications
You must be signed in to change notification settings - Fork 521
Open
Description
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:
const loading = useMutationLoading()
const { mutate, onDone } = useMutation(SOME_MUTATION)
const doThing = 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.
Versions
vue: 3.2.36
vue-apollo: 4.0.0-alpha.16
@apollo/client: 3.5.10
Metadata
Metadata
Assignees
Labels
No labels