You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, we are switching from apollo-tooling to graphql-code-generator for generating TypeScript type definitions for Graphql operations. We are generating the type definitions based on .graphql files inside our front-end, which works fine (so far 🤞). Since we are using React and the Apollo-client in our front-end, we like to auto generate the hooks as well using the @graphql-codegen/typescript-react-apollo package. The current configuration generates the hooks while importing the Graphql mutation/query from the provided .graphql file (we use graphql-tag/loader with webpack*). Unfortunately, the import for the Graphql mutation/query seems to be wrong (might be a misconfiguration on our end?).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, we are switching from apollo-tooling to graphql-code-generator for generating
TypeScript
type definitions for Graphql operations. We are generating the type definitions based on.graphql
files inside our front-end, which works fine (so far 🤞). Since we are using React and the Apollo-client in our front-end, we like to auto generate the hooks as well using the @graphql-codegen/typescript-react-apollo package. The current configuration generates the hooks while importing the Graphql mutation/query from the provided .graphql file (we use graphql-tag/loader with webpack*). Unfortunately, the import for the Graphql mutation/query seems to be wrong (might be a misconfiguration on our end?).Current situation:
Expected situation:
codegen.ts:
Packages:
*We are aware that graphql-let exists but it doesn't fit our use case.
Beta Was this translation helpful? Give feedback.
All reactions