ariadne-codegen icon indicating copy to clipboard operation
ariadne-codegen copied to clipboard

Support Env Variables in Remote Schema URL

Open PvtPuddles opened this issue 1 year ago • 0 comments

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 avatar Dec 11 '24 20:12 PvtPuddles