GraphQL requests work over HTTP just like REST, but instead of defining multiple endpoints, you typically interact with a single endpoint (e.g., /graphql
) and specify the exact data you want. This gives you flexibility, reduces over-fetching, and makes debugging APIs much simpler.
Create your first GraphQL request
Open API Client and Create a New Request
Click the API Client link in the left sidebar of the Requestly application, then click the + New
button to create a new request and select GraphQL request from the menu.
Name Your API Request
Give a descriptive title for your request to make it easy to identify later
Enter the GraphQL server URL
Add your GraphQL endpoint.
It will automatically perform schema introspection so you can explore available queries, mutations, and types.
Explore the schema
Under the Query tab, you’ll see three panels:
-
Query/Mutation editor: where you write or generate queries.
-
Variables editor: where you define variables in JSON format.
-
Schema: where you explore your API’s schema (Queries, Mutations, Subscriptions).
Build your query
In the schema explorer, select a field and expand its arguments. A query will automatically appear in the Query editor.
Alternatively, you can write your query manually
Add variables (optional)
In the Variables editor, provide values in JSON format.
Send the request
Click Send to execute your query and view the response.
Create a GraphQL request with multiple queries
Create a new request
Click the API Client link in the left sidebar of the Requestly application, then click the + New
button to create a new request and select GraphQL request from the menu.
Select multiple fields
From the schema explorer, select more than one field. Both queries will appear in the Query editor. Alternatively, you can manually new query / mutation
Choose a query to run
Only one query runs at a time. First, click the Send button, then select the query you want to run from the dropdown.
To execute another query, click the Send button again and select the other query from the dropdown.