← Back to API Tester FAQs
How to Query a GraphQL API
Sending a Query
- Open the API Tester and switch to "GraphQL" mode.
- Enter your GraphQL endpoint URL.
- Write your query in the Query textarea.
- Add variables as JSON in the Variables textarea (optional).
- Click Send.
Example
Query:
query GetUser($id: ID!) {
user(id: $id) {
name
email
}
}
Variables:
{"id": "42"}
Schema Explorer
Click the Explorer tab on the right, then click the refresh button (↻) to fetch the schema via introspection. You can browse all queries, mutations, and types with their fields, arguments, and descriptions. Use the search filter to find types quickly.
File Uploads
For GraphQL file uploads (multipart spec), use the File Fields section in the left panel:
- Click "+ Add Field"
- Set the variable path (e.g.
variables.file) - Attach one or more files
- The request is automatically sent as multipart/form-data
Subscriptions
The Subscriptions panel at the bottom supports SSE and WebSocket connections. Add a subscription, enter the endpoint URL, choose SSE or WS, and click Connect. Messages appear in real-time with timestamps and auto-formatted JSON.