Skip to content

Commit 3b5af21

Browse files
committed
AH review comments
1 parent 429c838 commit 3b5af21

File tree

7 files changed

+29
-21
lines changed

7 files changed

+29
-21
lines changed

articles/api-management/graphql-api.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: api-management
66
author: dlepow
77
ms.author: danlep
88
ms.topic: how-to
9-
ms.date: 02/15/2023
9+
ms.date: 02/24/2023
1010
ms.custom: event-tier1-build-2022
1111
---
1212

@@ -118,6 +118,25 @@ After importing the API, if needed, you can update the settings by using the [Se
118118

119119
[!INCLUDE [api-management-graphql-test.md](../../includes/api-management-graphql-test.md)]
120120

121+
### Test a subscription
122+
If your GraphQL API supports a subscription, you can test it in the test console.
123+
124+
1. Ensure that your API allows a WebSocket URL scheme (**WS** or **WSS**) that's appropriate for your API. You can enable this setting on the **Settings** tab.
125+
1. Set up a subscription query in the query editor, and then select **Connect** to establish a WebSocket connection to the backend service.
126+
127+
:::image type="content" source="media/graphql-api/test-graphql-subscription.png" alt-text="Screenshot of a subscription query in the query editor.":::
128+
1. Review connection details in the **Subscription** pane.
129+
130+
:::image type="content" source="media/graphql-api/graphql-websocket-connection.png" alt-text="Screenshot of Websocket connection in the portal.":::
131+
132+
1. Subscribed events appear in the **Subscription** pane. The WebSocket connection is maintained until you disconnect it or you connect to a new WebSocket subscription.
133+
134+
:::image type="content" source="media/graphql-api/graphql-subscription-event.png" alt-text="Screenshot of GraphQL subscription events in the portal.":::
135+
136+
## Secure your GraphQL API
137+
138+
Secure your GraphQL API by applying both existing [access control policies](api-management-policies.md#access-restriction-policies) and a [GraphQL validation policy](validate-graphql-request-policy.md) to secure and protect against GraphQL-specific attacks.
139+
121140
[!INCLUDE [api-management-define-api-topics.md](../../includes/api-management-define-api-topics.md)]
122141

123142
## Next steps

articles/api-management/graphql-schema-resolve-api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ type User {
108108

109109
[!INCLUDE [api-management-graphql-test.md](../../includes/api-management-graphql-test.md)]
110110

111+
## Secure your GraphQL API
112+
113+
Secure your GraphQL API by applying both existing [access control policies](api-management-policies.md#access-restriction-policies) and a [GraphQL validation policy](validate-graphql-request-policy.md) to secure and protect against GraphQL-specific attacks.
114+
115+
111116
[!INCLUDE [api-management-define-api-topics.md](../../includes/api-management-define-api-topics.md)]
112117

113118
## Next steps

includes/api-management-graphql-intro.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ ms.service: api-management
33
ms.topic: include
44
author: dlepow
55
ms.author: danlep
6-
ms.date: 02/21/2023
6+
ms.date: 02/24/2023
77
ms.custom:
88
---
99

10-
In API Management, you can add a GraphQL API in one of two models: pass-through to an existing GraphQL endpoint, or import a GraphQL schema and create a synthetic GraphQL API with custom field resolvers. For more information, see the GraphQL overview.
11-
<!-- Add link to GraphQL overview when merged -->
10+
In API Management, you can add a GraphQL API in one of two models: pass-through to an existing GraphQL endpoint, or import a GraphQL schema and create a synthetic GraphQL API with custom field resolvers. For more information, see the [GraphQL overview](../articles/api-management/graphql-apis-overview.md).

includes/api-management-graphql-test.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ms.service: api-management
33
ms.topic: include
44
author: dlepow
55
ms.author: danlep
6-
ms.date: 05/10/2022
6+
ms.date: 02/24/2023
77
ms.custom:
88
---
99

@@ -32,19 +32,4 @@ ms.custom:
3232
:::image type="content" source="media/api-management-graphql-test/graphql-query-response.png" alt-text="Screenshot of viewing the test query response.":::
3333

3434
1. Repeat preceding steps to test different payloads.
35-
1. When testing is complete, exit test console.
36-
37-
## Test a subscription
38-
If your GraphQL schema includes a subscription, you can test it in the test console.
39-
40-
1. Ensure that your API allows a WebSocket URL scheme (**WS** or **WSS**) that's appropriate for your API. You can enable this setting on the **Settings** tab.
41-
1. Set up a subscription query in the query editor, and then select **Connect** to establish a WebSocket connection to the backend service.
42-
43-
:::image type="content" source="media/api-management-graphql-test/test-graphql-subscription.png" alt-text="Screenshot of a subscription query in the query editor.":::
44-
1. Review connection details in the **Subscription** pane.
45-
46-
:::image type="content" source="media/api-management-graphql-test/graphql-websocket-connection.png" alt-text="Screenshot of Websocket connection in the portal.":::
47-
48-
1. Subscribed events appear in the **Subscription** pane. The WebSocket connection is maintained until you disconnect it or you connect to a new WebSocket subscription.
49-
50-
:::image type="content" source="media/api-management-graphql-test/graphql-subscription-event.png" alt-text="Screenshot of GraphQL subscription events in the portal.":::
35+
1. When testing is complete, exit test console.

0 commit comments

Comments
 (0)