Tag: environment-variables
-
Tried to use the environment variable in graphql codegen file
0 I tried to use the environment variable in the codegen.yml. I decided to generate the codegen.yml file by using the handlebars. yarn add handlebars codegen-template.yml overwrite: true generates: ./src/generated/graphql.tsx: schema: "{{REACT_APP_GRAPHQL_ENDPOINT}}" documents: src/**/*.graphql plugins: – typescript – typescript-operations – typescript-react-apollo package.json "scripts": { "generate-yaml": "npx handlebars -c .env -i codegen-template.yml -o codegen.yml" } and…