Use Postman's GraphQL client to create GraphQL requests with one or multiple queries.
The GraphQL client interface is specifically designed for crafting GraphQL requests. It enables you to explore a GraphQL API's data fields and construct queries by selecting fields or entering code in an editor. For requests with multiple queries, you can select specific queries and run them individually.
You can also create GraphQL requests with Postman's HTTP interface, which supports GraphQL but requires more steps than the GraphQL client.
This example creates and runs a GraphQL query using the schema explorer.
If you're using the Postman web app, you must use the Postman Desktop Agent. See About the Postman Agent for more information.
In Postman, select New > GraphQL to open a request in a new tab. (In the Postman desktop app, you can also select ⌘+N or Ctrl+N, then select GraphQL.)
Select the URL box, then select https://graphql.postman-echo.com/graphql
from the dropdown list. Postman uses introspection to load the schema and populate the schema explorer with data fields.
In the schema explorer, the data fields are grouped under their respective types: Query, Mutation, and Subscription.
In the schema explorer, select the hello
field, then select arguments person
, name
, and age
. A query based on your selections appears in the query editor.
You can also build a query by entering code in the query editor.
Enter your age and name in the input boxes next to age
and name
or in the query editor.
Select Query.
This request has multiple queries and runs them one at a time. To run only the selected query, select a checkbox in the schema explorer and select Query.
In Postman, select New > GraphQL to open a request in a new tab. (In the Postman desktop app, you can also select ⌘+N or Ctrl+N, then select GraphQL.)
Select the URL box, then select https://graphql.postman-echo.com/graphql
from the dropdown list. Postman uses introspection to load the schema and populate the schema explorer with data fields.
In the schema explorer, select the hello
, person
, and name
fields. Enter your name in the name
field. A query appears in the query editor.
In the schema explorer, scroll down and select the greetings
field. A second query appears in the query editor and the first query is dimmed.
In the query editor, select anywhere in the first query to activate it and select Query.
Select anywhere in the second query and select Query.
You can also use the Query button dropdown list to browse and select queries from a request with multiple queries.
Last modified: 2024/07/08
Additional resources
Videos
Blog posts
Public workspaces