Skip to content

Commit 22f6797

Browse files
authored
fix: useMutations onError Event hook gets triggered too early (#1585)
similar to #1558, except for onError
1 parent d421887 commit 22f6797

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/vue-apollo-composable/src/useMutation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export function useMutation<
109109
const apolloError = toApolloError(e)
110110
error.value = apolloError
111111
loading.value = false
112+
await nextTick()
112113
errorEvent.trigger(apolloError, {
113114
client,
114115
})

0 commit comments

Comments
 (0)