You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/configure-graphql-resolver.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: dlepow
6
6
7
7
ms.service: api-management
8
8
ms.topic: reference
9
-
ms.date: 06/08/2023
9
+
ms.date: 07/20/2023
10
10
ms.author: danlep
11
11
---
12
12
@@ -25,7 +25,7 @@ Currently, API Management supports resolvers that can access the following data
25
25
* A resolver is a resource containing a policy definition that's invoked only when a matching object type and field in the schema is executed.
26
26
* Each resolver resolves data for a single field. To resolve data for multiple fields, configure a separate resolver for each.
27
27
* Resolver-scoped policies are evaluated *after* any `inbound` and `backend` policies in the policy execution pipeline. They don't inherit policies from other scopes. For more information, see [Policies in API Management](api-management-howto-policies.md).
28
-
28
+
* You can configure API-scoped policies for a GraphQL API, independent of the resolver-scoped policies. For example, you might want to add a [validate-graphql-request](validate-graphql-request-policy.md) policy to the `inbound` scope to validate the request before the resolver is invoked. Configure API-scoped policies on the **API policies** tab for the API.
29
29
30
30
> [!IMPORTANT]
31
31
> * If you use the preview `set-graphql-resolver` policy in policy definitions, you should migrate to the managed resolvers described in this article.
@@ -59,13 +59,30 @@ The following steps create a resolver using an HTTP-based data source. The gener
59
59
60
60
:::image type="content" source="media/configure-graphql-resolver/configure-resolver-policy.png" alt-text="Screenshot of resolver policy editor in the portal." lightbox="media/configure-graphql-resolver/configure-resolver-policy.png":::
61
61
62
-
1. The resolver is attached to the field. Go to the **Resolvers** tab to list and manage the resolvers configured for the API. You can also create resolvers from the **Resolvers** tab.
62
+
The resolver is attached to the field and appears on the **Resolvers** tab.
63
+
63
64
64
65
:::image type="content" source="media/configure-graphql-resolver/list-resolvers.png" alt-text="Screenshot of the resolvers list for GraphQL API in the portal." lightbox="media/configure-graphql-resolver/list-resolvers.png":::
65
66
66
-
> [!TIP]
67
-
> * The **Linked** column indicates whether the resolver is configured for a field that's currently in the GraphQL schema. If a resolver isn't linked, it can't be invoked.
68
-
> * You can clone a listed resolver to quickly create a similar resolver that targets a different type and field. In the context menu (**...**), select **Clone**.
67
+
## Manage resolvers
68
+
69
+
List and manage the resolvers for a GraphQL API on the API's **Resolvers** tab.
70
+
71
+
On the **Resolvers** tab:
72
+
73
+
* The **Linked** column indicates whether the resolver is configured for a field that's currently in the GraphQL schema. If a resolver isn't linked, it can't be invoked.
74
+
75
+
* In the context menu (**...**) for a resolver, find commands to **Clone**, **Edit**, or **Delete** a resolver. Clone a listed resolver to quickly create a similar resolver that targets a different type and field.
76
+
77
+
* You can create a new resolver by selecting **+ Create**.
78
+
79
+
When you edit a single resolver, the **Edit resolver** page opens. You can:
80
+
81
+
* Update the resolver's policy definition and optionally the data source. Changing the data source overwrites the resolver's current policy definition.
82
+
83
+
* Change the type and field that the resolver targets.
84
+
85
+
* Test and debug the resolver's configuration. Select **Run test** to see sample resolver output that you can validate against the schema.
0 commit comments