This guide is a high-level overview of the GraphQL client interface.
Postman has a special client for GraphQL requests called the GraphQL client. When you create a GraphQL request in Postman, the GraphQL client loads automatically. The GraphQL client has features that enable you to create and run GraphQL requests more efficiently.
The GraphQL client automatically fetches a GraphQL API's schema and uses introspection to show you the available data fields. You can 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.
The GraphQL client interface has three main sections:
If you are using the Postman web app, you must use the Postman Desktop Agent. See About the Postman Agent for more information.
In the GraphQL client's request section, you can enter an endpoint in the URL box as you would in the regular Postman request interface. But the GraphQL client adds GraphQL-specific features, including an interactive schema explorer.
Protocol dropdown list - Change the protocol for a new request. Select the protocol dropdown list then select a request protocol.
You can't change the request protocol after you save the request.
URL box - Enter the GraphQL server's URL here. You can also select this to browse URLs you've already used.
Tabs - The following tabs are available:
Schema explorer - When you enter a GraphQL server's endpoint in the URL box, the endpoint's schema appears here. The schema explorer is also an interactive visual query editor where you can browse and select fields and arguments to build queries in the query editor.
Save - Saves the request to a collection. GraphQL requests can't be saved to collections that contain HTTP requests.
Share - Collaborate with team members, groups, and external users by sharing your requests with them. Learn more at Share your work in Postman.
Query - Runs the selected query. If there are multiple queries, a dropdown list is available where you can select individual queries to run.
Query editor - Build and edit queries here. You can enter queries manually or build them with the schema explorer. You can create multiple queries in the query editor and run them individually.
Variables editor - Create and edit your request's variables here. The variables editor is collapsed by default. Select the arrow next to Variables to expand it.
When you run a query, the response from the server appears here. The GraphQL client's response section is similar to Postman's regular response viewer.
The GraphQL client response section has the following tabs:
For subscription-type queries that return multiple responses over a persistent connection, the response section shows a list of messages in reverse chronological order, with the most recent message at the top. The messages can contain responses from the server or other information about the request like subscription confirmations or completion messages.
Select a message to expand it and see its contents. You can search for specific messages with the search icon . You can also filter for all messages, responses only, or other types of messages. Select Clear messages to remove all the messages from the response section. You can select Restore to show them again.
The GraphQL client's right sidebar gives you access to documentation, comments, and information about your request.
@
to tag others to ask a question, give feedback, and discuss your API.After learning about the basic interface elements, try making your first GraphQL query.
Last modified: 2024/05/30
Additional resources
Videos
Blog posts
Public workspaces