Switch to @nuxtjs/apollo module-style integration
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
||||
|
||||
export function useGqlClient(): ApolloClient<NormalizedCacheObject> {
|
||||
return useNuxtApp().$apollo as ApolloClient<NormalizedCacheObject>;
|
||||
export function useGqlClient() {
|
||||
const { client } = useApolloClient('default');
|
||||
return client as ApolloClient<NormalizedCacheObject>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user