Skip to content

Commit 3c3a42e

Browse files
Merge pull request #229665 from dlepow/revert-228150-gqlhowto
Revert "[APIM][GraphQL GA] How-to updates"
2 parents a5399cd + d4a0a16 commit 3c3a42e

34 files changed

+96
-686
lines changed

articles/api-management/TOC.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@
8888
href: devops-api-development-templates.md
8989
- name: APIs
9090
items:
91-
- name: GraphQL APIs
92-
href: graphql-apis-overview.md
9391
- name: API design ebook
9492
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
9593
- name: RESTful web API design
@@ -267,8 +265,6 @@
267265
- name: Manage secrets using named values
268266
displayName: Azure CLI, az apim nv
269267
href: api-management-howto-properties.md
270-
- name: Configure a GraphQL resolver
271-
href: configure-graphql-resolver.md
272268
- name: Secure your APIs
273269
items:
274270
- name: Secure API access
@@ -436,8 +432,6 @@
436432
href: forward-request-policy.md
437433
- name: get-authorization-context
438434
href: get-authorization-context-policy.md
439-
- name: http-data-source
440-
href: http-data-source-policy.md
441435
- name: include-fragment
442436
href: include-fragment-policy.md
443437
- name: invoke-dapr-binding
@@ -454,8 +448,6 @@
454448
href: mock-response-policy.md
455449
- name: proxy
456450
href: proxy-policy.md
457-
- name: publish-event
458-
href: publish-event-policy.md
459451
- name: publish-to-dapr
460452
href: publish-to-dapr-policy.md
461453
- name: quota

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

Lines changed: 6 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/22/2023
10+
ms.date: 02/07/2022
1111
ms.author: danlep
1212
---
1313

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

4545
<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/>
4646
<sup>2</sup> Including related functionality such as users, groups, issues, applications, and email templates and notifications.<br/>
4747
<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/>
48-
<sup>4</sup> The following policies aren't available in the Consumption tier: rate limit by key and quota by key.
48+
<sup>4</sup> The following policies aren't available in the Consumption tier: rate limit by key and quota by key. <br/>
49+
<sup>5</sup> GraphQL subscriptions aren't supported in the Consumption tier.

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

Lines changed: 8 additions & 6 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/22/2023
10+
ms.date: 08/04/2022
1111
ms.author: danlep
1212
---
1313

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

98100
### Policies
99101

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

109111
<sup>1</sup> Configured policies that aren't supported by the self-hosted gateway are skipped during policy execution.<br/>
110112
<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: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,6 @@ When configuring a policy, you must first select the scope at which the policy a
9999

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

102-
### GraphQL resolver policies
103-
104-
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).
105-
106-
* 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.
107-
* 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.
108-
* The gateway evaluates a resolver-scoped policy *after* any configured `inbound` and `backend` policies in the policy execution pipeline.
109-
110-
For more information, see [Configure a GraphQL resolver](configure-graphql-resolver.md).
111-
112102
## Examples
113103

114104
### Apply policies specified at different scopes

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

Lines changed: 3 additions & 4 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 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
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.
7979

8080
## Transformation policies
8181
- [Convert JSON to XML](json-to-xml-policy.md) - Converts request or response body from JSON to XML.
@@ -92,7 +92,6 @@ 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.
9695
- [Validate parameters](validate-parameters-policy.md) - Validates the request header, query, or path parameters against the API schema.
9796
- [Validate headers](validate-headers-policy.md) - Validates the response headers against the API schema.
9897
- [Validate status code](validate-status-code-policy.md) - Validates the HTTP status codes in

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

Lines changed: 2 additions & 4 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/22/2023
10+
ms.date: 01/13/2023
1111
ms.author: danlep
1212
---
1313
# API Management policy expressions
@@ -199,11 +199,10 @@ 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 /> [`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)`|
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)`|
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` |
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)|
207206
|<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).|
208207
|<a id="ref-context-operation"></a>`context.Operation`|`Id`: `string`<br /><br /> `Method`: `string`<br /><br /> `Name`: `string`<br /><br /> `UrlTemplate`: `string`|
209208
|<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`|
@@ -214,7 +213,6 @@ The `context` variable is implicitly available in every policy [expression](api-
214213
|<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?`|
215214
|<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`|
216215
|<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 />|
218216
|<a id="ref-igroup"></a>`IGroup`|`Id`: `string`<br /><br /> `Name`: `string`|
219217
|<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.|
220218
|<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)