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

Environment Variable should override Collection Variable #12874

Open
1 task done
kirkmadera opened this issue May 20, 2024 · 1 comment
Open
1 task done

Environment Variable should override Collection Variable #12874

kirkmadera opened this issue May 20, 2024 · 1 comment
Labels
product/api-client protocol/graphql Issues relating to the GraphQL protocol within Postman

Comments

@kirkmadera
Copy link

Is there an existing issue for this?

  • I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

An environment variable should override a collection variable, but is failing to do so in this case.

Steps To Reproduce

  1. Collection graphQlUrl variable is set to "{{baseUrl}}/graphql".
  2. Environment baseUrl variable is set to "https://warranty-backend-xxxx.local-rmgmedia.com"
  3. Environment graphQlUrl variable is set to "https://warranty-backend-xxxx.local-rmgmedia.com/admin/graphql"
  4. When I use the graphQlUrl variable as the URL for the query, it resolves to "https://warranty-backend-xxxx.local-rmgmedia.com/graphql" which is the result of "{{baseUrl}}/graphql".

It should instead resolve to "https://warranty-backend-xxxx.local-rmgmedia.com/admin/graphql"

Screenshots or Videos

Collection graphQlUrl variable:
image

Environment graphQlUrl variable:
image

Environment baseUrl variable:
image

However, it is still trying to post to the value produced by "{{baseUrl}}/graphql":
image

If I replace the variable URL with a string, it works:
image

Operating System

Windows

Postman Version

11.1.0

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

@kirkmadera
Copy link
Author

This might make the issue more clear. Postman is using a different URL to post to than it is posting to

image

What it SHOULD be doing
image

@ronork ronork added protocol/graphql Issues relating to the GraphQL protocol within Postman product/api-client labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/api-client protocol/graphql Issues relating to the GraphQL protocol within Postman
Projects
None yet
Development

No branches or pull requests

2 participants