Replies: 1 comment 4 replies
-
Codegen code is just a wrapper around the original apollo hooks. If you are importing it, it should work the same way. Did you follow the rest of the Apollo "Getting Started" section? It seems like you have a missing Provider/client? https://www.apollographql.com/docs/react/get-started/#2-initialize-apolloclient |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the monorepo where my client and other microservices use the same
graphql
package. to get the best out of the TS i compile thets
files to get the declaration files which fail if I don't have the@apollo/client
installed. On the other hand if I have the@apollo/client
installed in thegraphql
package then the react based client app fails with the following error:What should I do?
My current flow is when I change the
LocalSchema
i install the@apollo/client
then build the files then uninstall it. this is painful, really painful :)Source code files provided below:
the codegen.yml looks like this:
and the structure looks like this:
❯ tree -L 1 . ├── codegen.yml ├── index.d.ts ├── index.js ├── index.js.map ├── index.tsx ├── node_modules ├── nodes.d.ts ├── nodes.js ├── nodes.js.map ├── nodes.ts ├── package.json ├── README.md ├── tsconfig.json └── tsconfig.tsbuildinfo
Beta Was this translation helpful? Give feedback.
All reactions