Microsoft Azure API Management · Arazzo Workflow

Azure API Management Configure GraphQL Resolver

Version 1.0.0

Confirm a GraphQL API exists, attach a resolver, then list the API's resolvers.

1 workflow 1 source API 1 provider
View Spec View on GitHub A2AAI GatewayAPI CenterAPI GatewayAPI ManagementEnterpriseMCPMicrosoft AzureArazzoWorkflows

Provider

microsoft-azure-api-management

Workflows

configure-graphql-resolver
Attach a resolver to a GraphQL API and confirm it.
Confirms the API exists, creates a resolver bound to a type and field, then lists the API's resolvers to verify.
3 steps inputs: apiId, displayName, path, resolverId, resourceGroupName, serviceName, subscriptionId outputs: resolverCount, resolverResourceId
1
getApi
Api_Get
Read the GraphQL API to confirm it exists before attaching a resolver.
2
createResolver
GraphQLApiResolver_CreateOrUpdate
Create or update the resolver bound to the supplied type and field.
3
listResolvers
GraphQLApiResolver_ListByApi
List the API's resolvers to confirm the new resolver is registered.

Source API Descriptions

Arazzo Workflow Specification

microsoft-azure-api-management-configure-graphql-resolver-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Azure API Management Configure GraphQL Resolver
  summary: Confirm a GraphQL API exists, attach a resolver, then list the API's resolvers.
  description: >-
    Wires a field resolver to a GraphQL API so a schema field is backed by a
    data source. The workflow reads the API to confirm it exists, creates or
    updates a resolver bound to a type and field with a resolver policy, then
    lists the API's resolvers to confirm registration. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: azureApiManagementApi
  url: ../openapi/microsoft-azure-api-management-rest-api-openapi.yaml
  type: openapi
workflows:
- workflowId: configure-graphql-resolver
  summary: Attach a resolver to a GraphQL API and confirm it.
  description: >-
    Confirms the API exists, creates a resolver bound to a type and field, then
    lists the API's resolvers to verify.
  inputs:
    type: object
    required:
    - subscriptionId
    - resourceGroupName
    - serviceName
    - apiId
    - resolverId
    - displayName
    - path
    properties:
      subscriptionId:
        type: string
        description: The Azure subscription identifier.
      resourceGroupName:
        type: string
        description: The resource group containing the service.
      serviceName:
        type: string
        description: The API Management service name.
      apiId:
        type: string
        description: The GraphQL API identifier.
      resolverId:
        type: string
        description: The resolver identifier to create.
      displayName:
        type: string
        description: The resolver display name.
      path:
        type: string
        description: The GraphQL type and field the resolver binds to (e.g. Query/users).
  steps:
  - stepId: getApi
    description: >-
      Read the GraphQL API to confirm it exists before attaching a resolver.
    operationId: Api_Get
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: apiId
      in: path
      value: $inputs.apiId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      apiResourceId: $response.body#/id
  - stepId: createResolver
    description: >-
      Create or update the resolver bound to the supplied type and field.
    operationId: GraphQLApiResolver_CreateOrUpdate
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: apiId
      in: path
      value: $inputs.apiId
    - name: resolverId
      in: path
      value: $inputs.resolverId
    requestBody:
      contentType: application/json
      payload:
        properties:
          displayName: $inputs.displayName
          path: $inputs.path
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      resolverResourceId: $response.body#/id
  - stepId: listResolvers
    description: >-
      List the API's resolvers to confirm the new resolver is registered.
    operationId: GraphQLApiResolver_ListByApi
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: apiId
      in: path
      value: $inputs.apiId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      resolverCount: $response.body#/count
  outputs:
    resolverResourceId: $steps.createResolver.outputs.resolverResourceId
    resolverCount: $steps.listResolvers.outputs.resolverCount