Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with dotenv/config #16

Open
depsimon opened this issue Apr 7, 2022 · 2 comments
Open

Doesn't work with dotenv/config #16

depsimon opened this issue Apr 7, 2022 · 2 comments

Comments

@depsimon
Copy link

depsimon commented Apr 7, 2022

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"
@johnschult
Copy link

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.

@robertherber
Copy link

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants