You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
@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
[email protected]
-
extends
,devtools
,typescript
,ssr
,modules
,alias
,build
,app
,runtimeConfig
,sourcemap
,apollo
,vite
@nuxtjs/[email protected]
,@pinia/[email protected]
,@pinia-plugin-persistedstate/[email protected]
,[email protected]
,@nuxtjs/[email protected]
,()
-
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
The text was updated successfully, but these errors were encountered: