diff --git a/packages/vue-apollo-composable/src/useApolloClient.ts b/packages/vue-apollo-composable/src/useApolloClient.ts index 134392a1..7058c21b 100644 --- a/packages/vue-apollo-composable/src/useApolloClient.ts +++ b/packages/vue-apollo-composable/src/useApolloClient.ts @@ -23,10 +23,7 @@ function resolveDefaultClient (providedApolloClients: ClientDict | null, p } function resolveClientWithId (providedApolloClients: ClientDict | null, clientId: ClientId): NullableApolloClient { - if (!providedApolloClients) { - throw new Error(`No apolloClients injection found, tried to resolve '${clientId}' clientId`) - } - return providedApolloClients[clientId] + return providedApolloClients?.[clientId] } export function useApolloClient (clientId?: ClientId): UseApolloClientReturn {