Skip to content

Commit 5c5b3fb

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into linux-fixes
2 parents 839b226 + 080ce2b commit 5c5b3fb

File tree

51 files changed

+5925
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+5925
-114
lines changed

articles/api-management/TOC.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
href: devops-api-development-templates.md
9696
- name: APIs
9797
items:
98+
- name: GraphQL APIs
99+
href: graphql-apis-overview.md
98100
- name: API design ebook
99101
href: https://azure.microsoft.com/mediahandler/files/resourcefiles/api-design/Azure_API-Design_Guide_eBook.pdf?toc=%2Fazure%2Fapi-management%2Ftoc.json&bc=/azure/api-management/breadcrumb/toc.json
100102
- name: RESTful web API design
@@ -273,6 +275,8 @@
273275
- name: Manage secrets using named values
274276
displayName: Azure CLI, az apim nv
275277
href: api-management-howto-properties.md
278+
- name: Configure a GraphQL resolver
279+
href: configure-graphql-resolver.md
276280
- name: Secure your APIs
277281
items:
278282
- name: Secure API access
@@ -455,6 +459,8 @@
455459
href: forward-request-policy.md
456460
- name: get-authorization-context
457461
href: get-authorization-context-policy.md
462+
- name: http-data-source
463+
href: http-data-source-policy.md
458464
- name: include-fragment
459465
href: include-fragment-policy.md
460466
- name: invoke-dapr-binding
@@ -473,6 +479,8 @@
473479
href: mock-response-policy.md
474480
- name: proxy
475481
href: proxy-policy.md
482+
- name: publish-event
483+
href: publish-event-policy.md
476484
- name: publish-to-dapr
477485
href: publish-to-dapr-policy.md
478486
- name: quota

articles/api-management/api-management-features.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: dlepow
77

88
ms.service: api-management
99
ms.topic: article
10-
ms.date: 02/06/2023
10+
ms.date: 04/17/2023
1111
ms.author: danlep
1212
---
1313

@@ -41,12 +41,11 @@ Each API Management [pricing tier](https://aka.ms/apimpricing) offers a distinct
4141
| Direct management API | No | Yes | Yes | Yes | Yes |
4242
| Azure Monitor logs and metrics | No | Yes | Yes | Yes | Yes |
4343
| Static IP | No | Yes | Yes | Yes | Yes |
44-
| [WebSocket APIs](websocket-api.md) | No | Yes | Yes | Yes | Yes |
45-
| [GraphQL APIs](graphql-api.md)<sup>5</sup> | Yes | Yes | Yes | Yes | Yes |
46-
| [Synthetic GraphQL APIs (preview)](graphql-schema-resolve-api.md) | No | Yes | Yes | Yes | Yes |
44+
| [Pass-through WebSocket APIs](websocket-api.md) | No | Yes | Yes | Yes | Yes |
45+
| [Pass-through GraphQL APIs](graphql-apis-overview.md) | Yes | Yes | Yes | Yes | Yes |
46+
| [Synthetic GraphQL APIs](graphql-apis-overview.md) | Yes | Yes | Yes | Yes | Yes |
4747

4848
<sup>1</sup> Enables the use of Azure AD (and Azure AD B2C) as an identity provider for user sign in on the developer portal.<br/>
4949
<sup>2</sup> Including related functionality such as users, groups, issues, applications, and email templates and notifications.<br/>
5050
<sup>3</sup> See [Gateway overview](api-management-gateways-overview.md#feature-comparison-managed-versus-self-hosted-gateways) for a feature comparison of managed versus self-hosted gateways. In the Developer tier self-hosted gateways are limited to a single gateway node. <br/>
5151
<sup>4</sup> See [Gateway overview](api-management-gateways-overview.md#policies) for differences in policy support in the dedicated, consumption, and self-hosted gateways. <br/>
52-
<sup>5</sup> GraphQL subscriptions aren't supported in the Consumption tier.

articles/api-management/api-management-gateways-overview.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: dlepow
77

88
ms.service: api-management
99
ms.topic: conceptual
10-
ms.date: 02/06/2023
10+
ms.date: 02/22/2023
1111
ms.author: danlep
1212
---
1313

@@ -93,11 +93,9 @@ The following table compares features available in the managed gateway versus th
9393
| [Function App](import-function-app-as-api.md) | ✔️ | ✔️ | ✔️ |
9494
| [Container App](import-container-app-with-oas.md) | ✔️ | ✔️ | ✔️ |
9595
| [Service Fabric](../service-fabric/service-fabric-api-management-overview.md) | Developer, Premium |||
96-
| [Passthrough GraphQL](graphql-api.md) | ✔️ | ✔️<sup>1</sup> ||
97-
| [Synthetic GraphQL](graphql-schema-resolve-api.md) | ✔️ |||
98-
| [Passthrough WebSocket](websocket-api.md) | ✔️ || ✔️ |
99-
100-
<sup>1</sup> GraphQL subscriptions aren't supported in the Consumption tier.
96+
| [Pass-through GraphQL](graphql-apis-overview.md) | ✔️ | ✔️ ||
97+
| [Synthetic GraphQL](graphql-apis-overview.md)| ✔️ | ✔️ ||
98+
| [Pass-through WebSocket](websocket-api.md) | ✔️ || ✔️ |
10199

102100
### Policies
103101

@@ -106,9 +104,9 @@ Managed and self-hosted gateways support all available [policies](api-management
106104
| Policy | Managed (Dedicated) | Managed (Consumption) | Self-hosted<sup>1</sup> |
107105
| --- | ----- | ----- | ---------- |
108106
| [Dapr integration](api-management-policies.md#dapr-integration-policies) ||| ✔️ |
107+
| [GraphQL resolvers](api-management-policies.md#graphql-resolver-policies) and [GraphQL validation](api-management-policies.md#validation-policies)| ✔️ | ✔️ ||
109108
| [Get authorization context](get-authorization-context-policy.md) | ✔️ | ✔️ ||
110109
| [Quota and rate limit](api-management-policies.md#access-restriction-policies) | ✔️ | ✔️<sup>2</sup> | ✔️<sup>3</sup>
111-
| [Set GraphQL resolver](set-graphql-resolver-policy.md) | ✔️ |||
112110

113111
<sup>1</sup> Configured policies that aren't supported by the self-hosted gateway are skipped during policy execution.<br/>
114112
<sup>2</sup> The rate limit by key and quota by key policies aren't available in the Consumption tier.<br/>

articles/api-management/api-management-howto-policies.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ When configuring a policy, you must first select the scope at which the policy a
100100

101101
For more information, see [Set or edit policies](set-edit-policies.md#use-base-element-to-set-policy-evaluation-order).
102102

103+
### GraphQL resolver policies
104+
105+
In API Management, a [GraphQL resolver](configure-graphql-resolver.md) is configured using policies scoped to a specific operation type and field in a [GraphQL schema](graphql-apis-overview.md#resolvers).
106+
107+
* Currently, API Management supports GraphQL resolvers that specify HTTP data sources. Configure a single [`http-data-source`](http-data-source-policy.md) policy with elements to specify a request to (and optionally response from) an HTTP data source.
108+
* You can't include a resolver policy in policy definitions at other scopes such as API, product, or all APIs. It also doesn't inherit policies configured at other scopes.
109+
* The gateway evaluates a resolver-scoped policy *after* any configured `inbound` and `backend` policies in the policy execution pipeline.
110+
111+
For more information, see [Configure a GraphQL resolver](configure-graphql-resolver.md).
112+
103113
## Examples
104114

105115
### Apply policies specified at different scopes

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ More information about policies:
7373
- [Send message to Pub/Sub topic](publish-to-dapr-policy.md): Uses Dapr runtime to publish a message to a Publish/Subscribe topic. To learn more about Publish/Subscribe messaging in Dapr, see the description in this [README](https://github.com/dapr/docs/blob/master/README.md) file.
7474
- [Trigger output binding](invoke-dapr-binding-policy.md): Uses Dapr runtime to invoke an external system via output binding. To learn more about bindings in Dapr, see the description in this [README](https://github.com/dapr/docs/blob/master/README.md) file.
7575

76-
## GraphQL API policies
77-
- [Validate GraphQL request](validate-graphql-request-policy.md) - Validates and authorizes a request to a GraphQL API.
78-
- [Set GraphQL resolver](set-graphql-resolver-policy.md) - Retrieves or sets data for a GraphQL field in an object type specified in a GraphQL schema.
76+
## GraphQL resolver policies
77+
- [HTTP data source for resolver](http-data-source-policy.md) - Configures the HTTP request and optionally the HTTP response to resolve data for an object type and field in a GraphQL schema.
78+
- [Publish event to GraphQL subscription](publish-event-policy.md) - Publishes an event to one or more subscriptions specified in a GraphQL API schema. Used in the `http-response` element of the `http-data-source` policy
7979

8080
## Transformation policies
8181
- [Convert JSON to XML](json-to-xml-policy.md) - Converts request or response body from JSON to XML.
@@ -92,6 +92,7 @@ More information about policies:
9292
## Validation policies
9393

9494
- [Validate content](validate-content-policy.md) - Validates the size or content of a request or response body against one or more API schemas. The supported schema formats are JSON and XML.
95+
- [Validate GraphQL request](validate-graphql-request-policy.md) - Validates and authorizes a request to a GraphQL API.
9596
- [Validate parameters](validate-parameters-policy.md) - Validates the request header, query, or path parameters against the API schema.
9697
- [Validate headers](validate-headers-policy.md) - Validates the response headers against the API schema.
9798
- [Validate status code](validate-status-code-policy.md) - Validates the HTTP status codes in

articles/api-management/api-management-policy-expressions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,11 @@ The `context` variable is implicitly available in every policy [expression](api-
199199

200200
|Context Variable|Allowed methods, properties, and parameter values|
201201
|----------------------|-------------------------------------------------------|
202-
|`context`|[`Api`](#ref-context-api): [`IApi`](#ref-iapi)<br /><br /> [`Deployment`](#ref-context-deployment)<br /><br /> Elapsed: `TimeSpan` - time interval between the value of `Timestamp` and current time<br /><br /> [`LastError`](#ref-context-lasterror)<br /><br /> [`Operation`](#ref-context-operation)<br /><br /> [`Product`](#ref-context-product)<br /><br /> [`Request`](#ref-context-request)<br /><br /> `RequestId`: `Guid` - unique request identifier<br /><br /> [`Response`](#ref-context-response)<br /><br /> [`Subscription`](#ref-context-subscription)<br /><br /> `Timestamp`: `DateTime` - point in time when request was received<br /><br /> `Tracing`: `bool` - indicates if tracing is on or off <br /><br /> [User](#ref-context-user)<br /><br /> [`Variables`](#ref-context-variables): `IReadOnlyDictionary<string, object>`<br /><br /> `void Trace(message: string)`|
202+
|`context`|[`Api`](#ref-context-api): [`IApi`](#ref-iapi)<br /><br /> [`Deployment`](#ref-context-deployment)<br /><br /> Elapsed: `TimeSpan` - time interval between the value of `Timestamp` and current time<br /><br /> [`GraphQL`](#ref-context-graphql)<br /><br />[`LastError`](#ref-context-lasterror)<br /><br /> [`Operation`](#ref-context-operation)<br /><br /> [`Request`](#ref-context-request)<br /><br /> `RequestId`: `Guid` - unique request identifier<br /><br /> [`Response`](#ref-context-response)<br /><br /> [`Subscription`](#ref-context-subscription)<br /><br /> `Timestamp`: `DateTime` - point in time when request was received<br /><br /> `Tracing`: `bool` - indicates if tracing is on or off <br /><br /> [User](#ref-context-user)<br /><br /> [`Variables`](#ref-context-variables): `IReadOnlyDictionary<string, object>`<br /><br /> `void Trace(message: string)`|
203203
|<a id="ref-context-api"></a>`context.Api`|`Id`: `string`<br /><br /> `IsCurrentRevision`: `bool`<br /><br /> `Name`: `string`<br /><br /> `Path`: `string`<br /><br /> `Revision`: `string`<br /><br /> `ServiceUrl`: [`IUrl`](#ref-iurl)<br /><br /> `Version`: `string` <br /><br /> `Workspace`: [`IWorkspace`](#ref-iworkspace) |
204204
|<a id="ref-context-deployment"></a>`context.Deployment`|[`Gateway`](#ref-context-gateway)<br /><br /> `GatewayId`: `string` (returns 'managed' for managed gateways)<br /><br /> `Region`: `string`<br /><br /> `ServiceId`: `string`<br /><br /> `ServiceName`: `string`<br /><br /> `Certificates`: `IReadOnlyDictionary<string, X509Certificate2>`|
205205
|<a id="ref-context-gateway"></a>`context.Deployment.Gateway`|`Id`: `string` (returns 'managed' for managed gateways)<br /><br /> `InstanceId`: `string` (returns 'managed' for managed gateways)<br /><br /> `IsManaged`: `bool`|
206+
|<a id="ref-context-graphql"></a>`context.GraphQL`|`GraphQLArguments`: `IGraphQLDataObject`<br /><br /> `Parent`: `IGraphQLDataObject`<br/><br/>[Examples](configure-graphql-resolver.md#graphql-context)|
206207
|<a id="ref-context-lasterror"></a>`context.LastError`|`Source`: `string`<br /><br /> `Reason`: `string`<br /><br /> `Message`: `string`<br /><br /> `Scope`: `string`<br /><br /> `Section`: `string`<br /><br /> `Path`: `string`<br /><br /> `PolicyId`: `string`<br /><br /> For more information about `context.LastError`, see [Error handling](api-management-error-handling-policies.md).|
207208
|<a id="ref-context-operation"></a>`context.Operation`|`Id`: `string`<br /><br /> `Method`: `string`<br /><br /> `Name`: `string`<br /><br /> `UrlTemplate`: `string`|
208209
|<a id="ref-context-product"></a>`context.Product`|`Apis`: `IEnumerable<`[`IApi`](#ref-iapi)`>`<br /><br /> `ApprovalRequired`: `bool`<br /><br /> `Groups`: `IEnumerable<`[`IGroup`](#ref-igroup)`>`<br /><br /> `Id`: `string`<br /><br /> `Name`: `string`<br /><br /> `State`: `enum ProductState {NotPublished, Published}`<br /><br /> `SubscriptionLimit`: `int?`<br /><br /> `SubscriptionRequired`: `bool`<br /><br /> `Workspace`: [`IWorkspace`](#ref-iworkspace)|
@@ -213,6 +214,7 @@ The `context` variable is implicitly available in every policy [expression](api-
213214
|<a id="ref-context-subscription"></a>`context.Subscription`|`CreatedDate`: `DateTime`<br /><br /> `EndDate`: `DateTime?`<br /><br /> `Id`: `string`<br /><br /> `Key`: `string`<br /><br /> `Name`: `string`<br /><br /> `PrimaryKey`: `string`<br /><br /> `SecondaryKey`: `string`<br /><br /> `StartDate`: `DateTime?`|
214215
|<a id="ref-context-user"></a>`context.User`|`Email`: `string`<br /><br /> `FirstName`: `string`<br /><br /> `Groups`: `IEnumerable<`[`IGroup`](#ref-igroup)`>`<br /><br /> `Id`: `string`<br /><br /> `Identities`: `IEnumerable<`[`IUserIdentity`](#ref-iuseridentity)`>`<br /><br /> `LastName`: `string`<br /><br /> `Note`: `string`<br /><br /> `RegistrationDate`: `DateTime`|
215216
|<a id="ref-iapi"></a>`IApi`|`Id`: `string`<br /><br /> `Name`: `string`<br /><br /> `Path`: `string`<br /><br /> `Protocols`: `IEnumerable<string>`<br /><br /> `ServiceUrl`: [`IUrl`](#ref-iurl)<br /><br /> `SubscriptionKeyParameterNames`: [`ISubscriptionKeyParameterNames`](#ref-isubscriptionkeyparameternames)|
217+
|<a id="ref-igraphqldataobject"></a>`IGraphQLDataObject`|TBD<br /><br />|
216218
|<a id="ref-igroup"></a>`IGroup`|`Id`: `string`<br /><br /> `Name`: `string`|
217219
|<a id="ref-imessagebody"></a>`IMessageBody`|`As<T>(bool preserveContent = false): Where T: string, byte[], JObject, JToken, JArray, XNode, XElement, XDocument` <br /><br /> - The `context.Request.Body.As<T>` and `context.Response.Body.As<T>` methods read a request or response message body in specified type `T`. <br/><br/> - Or - <br/><br/>`AsFormUrlEncodedContent(bool preserveContent = false)` <br/></br>- The `context.Request.Body.AsFormUrlEncodedContent()` and `context.Response.Body.AsFormUrlEncodedContent()` methods read URL-encoded form data in a request or response message body and return an `IDictionary<string, IList<string>` object. The decoded object supports `IDictionary` operations and the following expressions: `ToQueryString()`, `JsonConvert.SerializeObject()`, `ToFormUrlEncodedContent().` <br/><br/> By default, the `As<T>` and `AsFormUrlEncodedContent()` methods:<br /><ul><li>Use the original message body stream.</li><li>Render it unavailable after it returns.</li></ul> <br />To avoid that and have the method operate on a copy of the body stream, set the `preserveContent` parameter to `true`, as shown in examples for the [set-body](set-body-policy.md#examples) policy.|
218220
|<a id="ref-iprivateendpointconnection"></a>`IPrivateEndpointConnection`|`Name`: `string`<br /><br /> `GroupId`: `string`<br /><br /> `MemberName`: `string`<br /><br />For more information, see the [REST API](/rest/api/apimanagement/current-ga/private-endpoint-connection/list-private-link-resources).|

0 commit comments

Comments
 (0)