graphql-codegen-vscode
graphql-codegen-vscode copied to clipboard
Doesn't work with dotenv/config
I'm using an environment variable to specify the schema path and I can't specify that in the extension.
Example script from my package.json
"gql:generate": "graphql-codegen --config codegen.yml -r dotenv/config"
This could be solved by having a configuration for the extension that allows you to add to the command line used. Without it, it's not very useful. Using environment variables in codegen.yaml
is not exactly an edge case.
This is big. I see two possible solutions:
- Supporting dotenv out-of-the-box - which would be great.
- Allowing to specify a custom codegen script command (like running
gql:generate
in the example provided by @depsimon).
For now I'm going with this extension - even though I had to manually source the shell..