So I have this codegen.yml
overwrite: true
schema:
- ${REACT_APP_GRAPHQL_URL}:
headers:
'x-hasura-admin-secret': ${REACT_APP_GRAPHQL_ADMIN_SECRET}
documents: "./src/**/*.{ts,tsx}"
generates:
src/generated/graphql.tsx:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-react-apollo"
config:
withHooks: true
My .env looks like this:
REACT_APP_GRAPHQL_URL=https://somesite.com/graphql
REACT_APP_GRAPHQL_ADMIN_SECRET=abcde1234
but it failed everytime I run codegen npm run codegen
and npm run codegen -r dotenv/config
. I've tried changing up the quote marks, spaces etc but it still doesn't work. When I replace the environment variable with the URI and admin-secret, it runs fine. What did I do wrong?