nuxt-modules / apollo

Nuxt.js module to use Vue-Apollo. The Apollo integration for GraphQL.
https://apollo.nuxtjs.org
MIT License
929 stars 194 forks source link

Module '"@nuxtjs/apollo"' has no exported member 'defineApolloClient' #608

Closed pixleight closed 3 months ago

pixleight commented 3 months ago

Environment


Describe the bug

Following the documentation for configuring an Apollo Client in a its own file: https://apollo.nuxtjs.org/getting-started/configuration#clients

Importing defineApolloClient results in an error:

Module '"@nuxtjs/apollo"' has no exported member 'defineApolloClient'.

Expected behaviour

defineApolloClient should be available to import from @nuxtjs/apollo

Reproduction

Minimal reproduction: https://stackblitz.com/edit/github-kyxu1x?file=apollo%2Fclients%2Fdefault.ts

Additional context

No response

Logs

No response

Diizzayy commented 3 months ago

@pixleight this was patched in v5.0.0-alpha.14, the utility can now be exported as follows:

import { defineApolloClient } from '@nuxtjs/apollo/config'