Codegen.yml #7838
Unanswered
suntoss0708
asked this question in
General
Codegen.yml
#7838
Replies: 0 comments
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 have following configuration on my package.json file:
"graphql:codegen": "graphql-codegen --config codegen.yml -r dotenv/config",
I need to use the content environment variable in codegen.yml file. The env file is not on the exact location as package.json file. I am using nx workspace.
my codegen file is following:
I couldn't access environment variable
overwrite: true schema: ${NX_SCHEMA_PATH} documents: 'apps/myra/**/*.graphql' watch: true generates: apps/myra/generated/graphql.ts: plugins: - add: content: - '//This Code is auto generated by graphql-codegen, DO NOT EDIT' - '//You can update the queries or mutations in *.graphql to generate any new changes.' - 'typescript' - 'typescript-operations' - 'typescript-react-query' config: skipTypename: true inlineFragmentTypes: combine fetcher: func: './axiosHelper#useAxios' isReactHook: true ./graphql.schema.json: plugins: - 'introspection'
Beta Was this translation helpful? Give feedback.
All reactions