I’m using Postman’s GraphQL request type and when clicking on a query’s checkbox to automatically select all fields Postaman does the following:
query Todo {
todo(id: null) {
id
description
isDone
}
}
Note that
Todo
is a simple query that expects anid
in order to return a todo with that id.
Well, I was looking for a way in where Postman could automatically create an $id
variable based on the arg’s name and also, automatically populate the variables panel resulting in the following behavior.
- User clicks on a query that expects some arguments.
- Postman automatically creates a query variable, and assigns it to the corresponding argument:
Query Editor:
query Todo($id: Int!) { todo(id: $id) { id description isDone } }
Variables Panel:
{ "id": null }
Is there any way that I could get this behavior with Postman? I’ve looked through the documentation and Postman’s settings, but couldn’t find anything related to this.
Any help would be much appreciated it.
Aditional Information:
- Postman Version: 11.17.1
- OS: Linux (Fedora Workstation Edition - v40)