diff --git a/packages/vue-apollo-composable/src/useMutation.ts b/packages/vue-apollo-composable/src/useMutation.ts index 00df3de..7bebcbd 100644 --- a/packages/vue-apollo-composable/src/useMutation.ts +++ b/packages/vue-apollo-composable/src/useMutation.ts @@ -22,6 +22,7 @@ export function useMutation< const loading = ref(false) const error = ref(null) + const called = ref(false) // Apollo Client const { resolveClient } = useApolloClient() @@ -36,6 +37,7 @@ export function useMutation< const client = resolveClient(currentOptions.clientId) error.value = null loading.value = true + called.value = true try { const result = await client.mutate({ mutation: document, @@ -58,5 +60,6 @@ export function useMutation< mutate, loading, error, + called, } } \ No newline at end of file