Skip to content

Commit 0ae5eb9

Browse files
committed
[APIM] Test single resolver
1 parent 98b6db6 commit 0ae5eb9

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

articles/api-management/configure-graphql-resolver.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: dlepow
66

77
ms.service: api-management
88
ms.topic: reference
9-
ms.date: 06/08/2023
9+
ms.date: 07/20/2023
1010
ms.author: danlep
1111
---
1212

@@ -25,7 +25,7 @@ Currently, API Management supports resolvers that can access the following data
2525
* 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.
2626
* Each resolver resolves data for a single field. To resolve data for multiple fields, configure a separate resolver for each.
2727
* 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.
2929

3030
> [!IMPORTANT]
3131
> * 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
5959

6060
:::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":::
6161

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+
6364

6465
:::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":::
6566

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.
6986

7087
## GraphQL context
7188

0 commit comments

Comments
 (0)