Closed gerhardavon closed 2 years ago
It's an issue with @apollo/client
not apollo-angular
so please open an issue there.
Plus as stated in the documentation multiple times, you want to always use sub-packages of @apollo/client/*
and not @apollo/client
directly.
When applying the most basic example of reactive forms. I get an error in the compiler that it relies on react.
Read following part of the documentation
https://apollo-angular.com/docs/local-state/reactive-variables refers to https://www.apollographql.com/docs/react/local-state/reactive-variables/
When applying the most basic example of reactive variables i get an error while compiling:
import { makeVar } from '@apollo/client';
const cartItemsVar = makeVar([]);
./node_modules/@apollo/client/react/context/ApolloConsumer.js:2:0-31 - Error: Module not found: Error: Can't resolve 'react' in '/home/gerhard/Workspace/creditcare-backoffice/node_modules/@apollo/client/react/context'
I would expect the variable to be an empty array.
├── @angular/cli@12.2.15 ├── @angular/core@12.2.15 ├── @apollo/client@3.5.9 ├── apollo-angular@3.0.0 ├── graphql@15.8.0 └── typescript@4.3.5