You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the tracker for existing similar issues and I know that duplicates will be closed
Describe the Issue
When interacting with a GraphQL server using the Postman Visual Code extension, it is not possible to load the schema.
Looking at the console output, {{url}} variable is utilized:
I have defined the variable as a global, and in the pre-request script included:
console.log(
pm.globals.get("url")
);
Now, when I click on the refresh button to pull down the schema, the following is output in the console:
Whereas, when I click on the send button to make a query request:
Note that I have replicated the same value in the POST url to ensure that both the schema request and query requests are using the same.
It seems that the global {{url}} value is not referenced properly by the schema request.
Steps To Reproduce
In Visual Studio Code, open the Postman extension.
In the Environments section, ensure global url value is defined:
4. Select "New HTTP Request"
- specify it as "POST" with url as `http://{{url}}/` (This url replicates what schema request uses, so you will need to be able to hit a valid GraphQL server via http)
- select "Body" and then check off "GraphQL"
5. Specify to auto fetch the schema
6. Refresh the schema
7. Observe error in the Postman console:
Screenshots or Videos
No response
Operating System
macOS
Postman Version
0.14.3
Postman Platform
Other
User Account Type
Signed In User
Additional Context?
No response
The text was updated successfully, but these errors were encountered:
From the expectations perspective, my first instinct was that the URL defined for the POST request would be used in the schema request. I.e. the same URL should be utilized for both body requests and schema requests.
Alternatively, it could be worthwhile allowing users to specify the url for the schema request.
Relying on the {{url}} variable seems a bit cryptic and is only going to be picked up by people if they inspect the logs/console.
Is there an existing issue for this?
Describe the Issue
When interacting with a GraphQL server using the Postman Visual Code extension, it is not possible to load the schema.
Looking at the console output,
{{url}}
variable is utilized:I have defined the variable as a global, and in the pre-request script included:
Now, when I click on the refresh button to pull down the schema, the following is output in the console:
Whereas, when I click on the send button to make a query request:
Note that I have replicated the same value in the POST url to ensure that both the schema request and query requests are using the same.
It seems that the global {{url}} value is not referenced properly by the schema request.
Steps To Reproduce
Screenshots or Videos
No response
Operating System
macOS
Postman Version
0.14.3
Postman Platform
Other
User Account Type
Signed In User
Additional Context?
No response
The text was updated successfully, but these errors were encountered: