-
Notifications
You must be signed in to change notification settings - Fork 272
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
Add dotenv to allow router to read environment variables from .env file #6117
Conversation
❌ Docs Preview FailedError
|
CI performance tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do this we should use the dotenvy
crate, as dotenv
is unmaintained.
Good catch. Switched to that package! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall PR LGTM, I would really have this feature in the router because I already struggled with that. I'm just wondering what could be the impact on our existing users ? Could it break something or have weird behavior ? Like for example what if they already had that .env file with wrong values but they're still providing environment variables like they always did before with the right values ? What's the priority order in that case ? Also does it keep the same logics if they use the argument in command line (like --config
for example) but they're also providing the APOLLO_ROUTER_CONFIG_PATH
? And what's the behavior now if additionally we provide the same env var in .env file ? I think we need to test it manually (at least) and document it somewhere
Also plenty of folks use I'm really not sure that the Router should really take on this concern when there are off the shelf tools that handle this generically. I'd like to know why those other tools can't just be used without introducing this to the Router directly, before we entertain a PR that adds it. |
Add dotenv to allow router to read environment variables from .env file
Possibly worth discussing:
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩