Skip to content

Commit 88954c3

Browse files
committed
[APIM] Order of policy elements and attributes
1 parent 996af3c commit 88954c3

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

articles/api-management/graphql-policies.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,16 @@ The `set-graphql-resolver` policy retrieves or sets data for a GraphQL field in
152152
<set-graphql-resolver parent-type="type" field="field">
153153
<http-data-source>
154154
<http-request>
155-
<set-method>HTTP method</set-method>
155+
<set-method>set-method policy configuration for HTTP method</set-method>
156156
<set-url>URL</set-url>
157-
[...]
157+
<set-header>set-header policy configuration</set-header>
158+
<set-body>set-body policy configuration</set-body>
159+
<authentication-certificate>authentication-certificate policy configuration</authentication-certificate>
158160
</http-request>
159161
<http-response>
160-
[...]
162+
<json-to-xml>json-to-xml policy configuration</json-to-xml>
163+
<xml-to-json>xml-to-json policy configuration</xml-to-json>
164+
<find-and-replace>find-and-replace policy configuration</find-and-replace>
161165
</http-response>
162166
</http-data-source>
163167
</set-graphql-resolver>
@@ -287,14 +291,22 @@ type User {
287291
| `http-data-source` | Configures the HTTP request and optionally the HTTP response that are used to resolve data for the given `parent-type` and `field`. | Yes |
288292
| `http-request` | Specifies a URL and child policies to configure the resolver's HTTP request. Each of the following policies can be specified at most once in the element. <br/><br/>Required policy: [set-method](api-management-advanced-policies.md#SetRequestMethod)<br/><br/>Optional policies: [set-header](api-management-transformation-policies.md#SetHTTPheader), [set-body](api-management-transformation-policies.md#SetBody), [authentication-certificate](api-management-authentication-policies.md#ClientCertificate) | Yes |
289293
| `set-url` | The URL of the resolver's HTTP request. | Yes |
290-
| `http-response` | Optionally specifies child policies to configure the resolver's HTTP response. If not specified, the response is returned as a raw string. Each of the following policies can be specified at most once. <br/><br/>Optional policies: [set-body](api-management-transformation-policies.md#SetBody), [json-to-xml](api-management-transformation-policies.md#ConvertJSONtoXML), [xml-to-json](api-management-transformation-policies.md#ConvertXMLtoJSON), [find-and-replace](api-management-transformation-policies.md#Findandreplacestringinbody) | No |
294+
| `http-response` | Optionally specifies child policies to configure the resolver's HTTP response. If not specified, the response is returned as a raw string. Each of the following policies can be specified at most once. <br/><br/>Optional policies: [set-body](api-management-transformation-policies.md#SetBody), , [xml-to-json](api-management-transformation-policies.md#ConvertXMLtoJSON), [find-and-replace](api-management-transformation-policies.md#Findandreplacestringinbody) | No |
291295

292296
### Attributes
293297

294298
| Name | Description | Required | Default |
295299
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
296300
| `parent-type`| An object type in the GraphQL schema. | Yes | N/A |
297301
| `field`| A field of the specified `parent-type` in the GraphQL schema. | Yes | N/A |
302+
| `set-method`| HTTP method of the resolver's HTTP request, specified using the [set-method](api-management-advanced-policies.md#SetRequestMethod) policy. | Yes | N/A |
303+
| `set-url` | URL of the resolver's HTTP request. | Yes | N/A |
304+
| `set-header` | Header set in the resolver's HTTP request, specified using the [set-header](api-management-transformation-policies.md#SetHTTPheader) policy. | No | N/A |
305+
| `set-body` | Body set in the resolver's HTTP request, specified using the [set-body](api-management-transformation-policies.md#SetBody) policy. | No | N/A |
306+
| `authentication-certificate` | Client certificate presented in the resolver's HTTP request, specified using the [authentication-certificate](api-management-authentication-policies.md#ClientCertificate) policy. | No | N/A |
307+
| `json-to-xml` | Transforms the resolver's HTTP response using the [json-to-xml](api-management-transformation-policies.md#ConvertJSONtoXML) policy. | No | N/A |
308+
| `xml-to-json` | Transforms the resolver's HTTP response using the [xml-to-json](api-management-transformation-policies.md#ConvertJSONtoXML) policy. | No | N/A |
309+
| `find-and-replace` | Transforms the resolver's HTTP response using the [find-and-replace](api-management-transformation-policies.md#Findandreplacestringinbody) policy. | No | N/A |
298310

299311
> [!NOTE]
300312
> Currently, the values of `parent-type` and `field` aren't validated by this policy. If they aren't valid, the policy is ignored, and the GraphQL query is forwarded to a GraphQL endpoint (if one is configured).

articles/api-management/set-edit-policies.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ To configure a policy:
106106
</on-error>
107107
</policies>
108108
```
109+
> [!NOTE]
110+
> Set policy attributes and elements in the order provided in the policy statement and examples.
111+
109112
1. Select **Save** to propagate changes to the API Management gateway immediately.
110113

111114
The **ip-filter** policy now appears in the **Inbound processing** section.

includes/api-management-policy-generic-alert.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
author: dlepow
33
ms.service: api-management
44
ms.topic: include
5-
ms.date: 03/15/2022
5+
ms.date: 06/27/2022
66
ms.author: danlep
77
---
88
> [!TIP]
9-
> Learn [how to set or edit API Management policies](../articles/api-management/set-edit-policies.md).
9+
> Set policy attributes and elements in the order provided in the policy statement and examples. Learn more about [how to set or edit API Management policies](../articles/api-management/set-edit-policies.md).

0 commit comments

Comments
 (0)