-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54fd75c
commit b112f37
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Add dotenv to allow router to read environment variables from .env file ([PR #6117](https://github.com/apollographql/router/pull/6117)) | ||
|
||
Router will now read environment variables from `.env` file. This is helpful for local development to inject in `APOLLO_KEY` and `APOLLO_GRAPH_REF` from a `.env` file. It also makes these environment variables available everywhere they are currently available such as in rhai scripts: | ||
|
||
``` | ||
# .env | ||
MY_COOL_VARIABLE="yeaaaaa man!" | ||
# main.rhai | ||
log_info(`MY_COOL_VARIABLE: ${env::get("MY_COOL_VARIABLE")}`); | ||
``` | ||
|
||
By [@andrewmcgivery](https://github.com/andrewmcgivery) in https://github.com/apollographql/router/pull/6117 |