diff --git a/packages/vue-apollo-composable/src/useQuery.ts b/packages/vue-apollo-composable/src/useQuery.ts index 83b8ee82..9a5ad219 100644 --- a/packages/vue-apollo-composable/src/useQuery.ts +++ b/packages/vue-apollo-composable/src/useQuery.ts @@ -283,8 +283,10 @@ export function useQueryImpl< function onError (queryError: unknown) { // any error should already be an ApolloError, but we make sure const apolloError = toApolloError(queryError) + const client = resolveClient(currentOptions.value?.clientId) + const errorPolicy = currentOptions.value?.errorPolicy || client.defaultOptions?.watchQuery?.errorPolicy - if (currentOptions.value?.errorPolicy !== 'none') { + if (errorPolicy && errorPolicy !== 'none') { processNextResult((query.value as ObservableQuery).getCurrentResult()) } processError(apolloError)