Open veerendrapatel opened 1 month ago
@Diizzayy Both URLs point to the same GitHub repository but diff steps to configure client. https://nuxt.com/modules/apollo https://apollo.nuxtjs.org/getting-started/quick-start https://github.com/Diizzayy/nuxt-graphql-client Question: Which one is recommended for a MultiClient setup? I followed this quick start guide, and it works with "@vue/apollo-composable": "4.0.0-beta.12". While useAsyncQuery works, useQuery does not, which is discussed in this GitHub issue. However, when I upgraded from Nuxt 3.7 to 3.11, useAsyncQuery stopped working. The following code throws an error for the supplied client ID cmsApollo: const res = await useAsyncQuery(GET_ACCOUNT(accParam), "cmsApollo"); Please provide your input on which approach I should follow to ensure smooth future upgrades of Nuxt.
Environment
Darwin
v18.0.0
3.7.4
3.9.0
2.6.3
yarn@1.22.19
-
extends
,devtools
,typescript
,ssr
,modules
,alias
,build
,app
,runtimeConfig
,sourcemap
,apollo
,vite
@nuxtjs/apollo@5.0.0-alpha.7
,@pinia/nuxt@0.4.11
,@pinia-plugin-persistedstate/nuxt@1.1.2
,nuxt-lodash@2.5.3
,@nuxtjs/tailwindcss@6.10.1
,()
-
Describe the bug
I have multiple graphql client configured. If I use useAsyncQuery supplying clientId it works const res = await useAsyncQuery(GET_EVENT(evParam), "cmsApollo");
If I use useQuery supplying clientId I get error - Error: No apolloClients injection found, tried to resolve 'cmsApollo' clientId
const res = useQuery( GET_EVENT(evParam), {}, { clientId: "cmsApollo" } ); Error: No apolloClients injection found, tried to resolve 'cmsApollo' clientId
Expected behaviour
useQuery should work with clientId
Reproduction
No response
Additional context
No response
Logs
No response