ms.service | ms.topic | author | ms.author | ms.date | ms.custom |
---|---|---|---|---|---|
api-management |
include |
dlepow |
danlep |
05/10/2022 |
-
Navigate to your API Management instance.
-
From the side navigation menu, under the APIs section, select APIs.
-
Under All APIs, select your GraphQL API.
-
Select the Test tab to access the test console.
-
Under Headers:
- Select the header from the Name drop-down menu.
- Enter the value to the Value field.
- Add more headers by selecting + Add header.
- Delete headers using the trashcan icon.
-
If you've added a product to your GraphQL API, apply product scope under Apply product scope.
-
Under Query editor, either:
-
Select at least one field or subfield from the list in the side menu. The fields and subfields you select appear in the query editor.
-
Start typing in the query editor to compose a query.
:::image type="content" source="media/api-management-graphql-test/test-graphql-query.png" alt-text="Screenshot of adding fields to the query editor.":::
-
-
Under Query variables, add variables to reuse the same query or mutation and pass different values.
-
Select Send.
-
View the Response.
:::image type="content" source="media/api-management-graphql-test/graphql-query-response.png" alt-text="Screenshot of viewing the test query response.":::
-
Repeat preceding steps to test different payloads.
-
When testing is complete, exit test console.
Note
You can test a subscription in the test console:
- Set up a subscription query in the query editor, and then select Connect to establish a WebSocket connection to the backend service.
- Review connection details in the Subscription pane.
- The WebSocket connection is maintained until you disconnect it or you connect to a new WebSocket subscription.