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

Support Env Variables in Remote Schema URL #328

Open
PvtPuddles opened this issue Dec 11, 2024 · 0 comments · May be fixed by #332
Open

Support Env Variables in Remote Schema URL #328

PvtPuddles opened this issue Dec 11, 2024 · 0 comments · May be fixed by #332

Comments

@PvtPuddles
Copy link

Hello. I would like to parameterize my remote_schema_url with environment variables (similar to remote_schema_headers), but it doesn't appear possible.

My use case is that our organization has several development systems and multiple production systems, and we typically switch between them using our .env files.

Ex:
.env

# REMOTE_SERVER="https://MyDomain.com"
REMOTE_SERVER="https://dev.MyDomain.com"

pyproject.toml

[tool.ariadne-codegen]
remote_schema_url = "${REMOTE_SERVER}/graphql"
remote_schema_headers = {"Authorization" = "$REMOTE_AUTHORIZATION"}
@PvtPuddles PvtPuddles changed the title Support Env Variables in Remove Schema URL Support Env Variables in Remote Schema URL Dec 11, 2024
bombsimon added a commit to bombsimon/ariadne-codegen that referenced this issue Dec 26, 2024
This allows an environment variable in any position for headers as long
as it is in format `$VAR` or `${VAR}` allowing alphanumeric characters
and underscore `_`. This is now also applied to `remove_schema_url` in
addition to headers.

Fixes mirumee#328
Relates to mirumee#231
bombsimon added a commit to bombsimon/ariadne-codegen that referenced this issue Dec 26, 2024
This allows an environment variable in any position for headers as long
as it is in format `$VAR` or `${VAR}` allowing alphanumeric characters
and underscore `_`. This is now also applied to `remove_schema_url` in
addition to headers.

Fixes mirumee#328
Relates to mirumee#231
bombsimon added a commit to bombsimon/ariadne-codegen that referenced this issue Dec 26, 2024
This allows an environment variable in any position for headers as long
as it is in format `$VAR` or `${VAR}` allowing alphanumeric characters
and underscore `_`. This is now also applied to `remote_schema_url` in
addition to headers.

Fixes mirumee#328
Relates to mirumee#231
@bombsimon bombsimon linked a pull request Dec 26, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant