Skip to content

fix(envvar): substitute environment variables in GraphQL query (#1945) - #1960

Open
ayam04 wants to merge 1 commit into
foss42:mainfrom
ayam04:fix/envvar-substitute-graphql-query
Open

ayam04 wants to merge 1 commit into
foss42:mainfrom
ayam04:fix/envvar-substitute-graphql-query

Conversation

@ayam04

@ayam04 ayam04 commented Nov 30, 2026

Copy link
Copy Markdown

Fixes #1945.

substituteHttpRequestModel substituted url/headers/params/formData/body/authModel but not query. GraphQL requests build their body from query (getGraphQLBody), so {{var}} placeholders were sent literally and also showed unresolved in View Code.

Change: add query: substituteVariables(httpRequestModel.query, combinedEnvVarMap). View Code already calls substituteHttpRequestModel, so it benefits too.

Tests: added a regression test in envvar_utils_test.dart mirroring the body case; full envvar_utils suite 44/44 green.

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 this pull request may close these issues.

[Bug] Environment variables are not substituted in GraphQL query

1 participant