Closed ricar2ce closed 1 year ago
I haven't tried it myself, but did you try putting provideApolloClient
inside the boot file after the client is initialized?
Scott
I haven't tried it myself, but did you try putting
provideApolloClient
inside the boot file after the client is initialized?Scott
this is my apollo boot file:
...
import { getClientOptions } from 'src/apollo'
export default boot(
({ app }) => {
// Default client.
const options = /* await */ getClientOptions(/* {app, router ...} */)
const apolloClient = new ApolloClient(options)
const apolloClients = {
default: apolloClient,
}
app.provide(ApolloClients, apolloClients)
}
)
Yes, try adding provideApolloClient
inside the boot
method.
Scott
Hello, i am getting "
Error: Apollo client with id default not found. Use provideApolloClient() if you are outside of a component setup
" when i make use of extension inside q-dialog (modal) component. I have made sure that my apollo boot file is register in quasar.conf.js, and any other needed config and the extension works perfectly outside of q-dialog.I temporarily had to recreate a whole client inside the component,
but it doesn't seem like an optimal solution.
any other ideas to fix this? thanks in advance