Skip to content

[APIM] az apim graphql resolver: Add update command#33481

Open
danakim1004au-prog wants to merge 1 commit into
Azure:devfrom
danakim1004au-prog:apim-graphql-resolver-update
Open

[APIM] az apim graphql resolver: Add update command#33481
danakim1004au-prog wants to merge 1 commit into
Azure:devfrom
danakim1004au-prog:apim-graphql-resolver-update

Conversation

@danakim1004au-prog
Copy link
Copy Markdown

Related command
az apim graphql resolver update

Description
Adds the missing update command to the az apim graphql resolver group.
The GraphQLApiResolver.update operation exists in azure-mgmt-apimanagement
but was not exposed in the CLI, so the resolver group only supported
create/show/list/delete. This PR completes the CRUD surface, letting users
update a resolver's display name, path, and description in place.

Testing Guide
azdev test apim (playback) passes. The test_apim_core_service scenario now
also exercises the new command:
az apim graphql resolver update -g <rg> --service-name <svc> --api-id <api> --resolver-id <id> --display-name "..." --description "..."

Note: the recording for the new step was added to the existing
test_apim_core_service cassette. A live recording on Developer SKU was blocked
by transient ManagementApiRequestFailed platform-upgrade downtime; happy to
regenerate a full live recording if preferred.

History Notes
[APIM] az apim graphql resolver update: Add command to update a GraphQL API resolver


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings June 2, 2026 09:05
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jun 2, 2026
@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

Thank you for your contribution @danakim1004au-prog! We will review the pull request and get back to you soon.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds support for updating APIM GraphQL resolvers via a new az apim graphql resolver update command, along with scenario test coverage and help/recording updates.

Changes:

  • Register apim graphql resolver update as a generic update command and implement the custom update mutator.
  • Add CLI arguments and help text for the new update command.
  • Extend the APIM core scenario test + recordings to cover updating a GraphQL resolver.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/apim/custom.py Adds the custom update function used by the generic update flow to mutate resolver fields.
src/azure-cli/azure/cli/command_modules/apim/commands.py Registers the new apim graphql resolver update command.
src/azure-cli/azure/cli/command_modules/apim/_params.py Adds argument definitions for the update command.
src/azure-cli/azure/cli/command_modules/apim/_help.py Documents the new update command with an example.
src/azure-cli/azure/cli/command_modules/apim/tests/latest/test_apim_scenario.py Adds a scenario step that runs the new update command.
src/azure-cli/azure/cli/command_modules/apim/tests/latest/recordings/test_apim_core_service.yaml Updates recordings with the GET/PUT interactions for the update command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +468 to +473
c.argument('resolver_id',
help='Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.')
c.argument('display_name', help='Resolver Name.')
c.argument('path', help='Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.')
c.argument('description',
help='Description of the resolver. May include HTML formatting tags.')
Comment on lines +459 to +463
self.cmd(
'apim graphql resolver update -g "{rg}" --service-name "{service_name}" --api-id "{graphql_api_id}" --resolver-id "{resolver_id}" --display-name "{resolver_updated_display_name}" --description "{resolver_updated_description}"',
checks=[self.check('name', '{resolver_id}'),
self.check('path', '{resolver_path}'),
self.check('description', '{resolver_updated_description}')])
resolver_count = len(self.cmd('apim graphql resolver list -g "{rg}" -n "{service_name}" --api-id "{graphql_api_id}"').get_output_in_json())
self.assertEqual(resolver_count, 1)

#update resolver
@danakim1004au-prog
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@yonzhan yonzhan assigned yanzhudd and unassigned zhoxing-ms Jun 2, 2026
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jun 2, 2026

APIM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad API Management az apim Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants