Open floppey opened 1 year ago
Normally it should be working fine, in our project we have no problems with the current GraphQL and Apollo-Client version.
I think the problem is that you need to use the "core" package directly after the update of the Apollo-Client 3:
import { ApolloClient } from '@apollo/client/core'
When you use the imports from @apollo/client
the "react" dependency hooks in.
yes/ I also don't have nay issue I am using latest versions of packages. vite, vue 3.3, gql 3. Apoolo v3 has some limitations in their TS when use imports. you can find related issues on their repo. It will be fixed in apollo package v4
This is the error I am getting:
[vite] error while updating dependencies:
Error: ENOENT: no such file or directory, open './node_modules/apollo-boost/lib/bundle.esm.js'
Edit:
Fixed by running yarn add apollo-boost
Describe the bug I'm trying to update our dependencies to use the latest version of graphql and apollo client, but I can't find a way to do this with
vue-apollo
.Currently if I update graphql to the latest version, or any 16.x version I get an error because
apollo-boost
requires version 15.xAccording to apollo's documentation
apollo-boost
should not be used with the latest version of@apollo/client
.As far as I can tell the current version of
vue-apollo
(3.1.0) is fairly outdated and does not support the latest version of@apollo/client
. I did find what looks like a new version ofvue-apollo
, but now called@vue/apollo-composable
. The documentation here is very lacking and after installing it and using the new package my project crashes due to a missingReact
dependency.Installation instructions from https://v4.apollo.vuejs.org/guide/installation.html :
Error when installing:
After installing with
--legacy-peer-deps
flag and trying to useApolloClient
from@apollo/client
:I then get this error when I run the application:
Expected behavior I'd like to be able to use an up to date version of
ApolloClient
in my vue application.Versions vue: 3.2.37 vue-apollo: 3.1.0 @apollo/client: 3.7.4 @vue/apollo-composable: 4.0.0-beta.1