[APIM] az apim graphql resolver: Add update command#33481
Open
danakim1004au-prog wants to merge 1 commit into
Open
[APIM] az apim graphql resolver: Add update command#33481danakim1004au-prog wants to merge 1 commit into
danakim1004au-prog wants to merge 1 commit into
Conversation
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
Contributor
|
Thank you for your contribution @danakim1004au-prog! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
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 updateas 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 |
Author
|
@microsoft-github-policy-service agree |
Collaborator
|
APIM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related command
az apim graphql resolver updateDescription
Adds the missing
updatecommand to theaz apim graphql resolvergroup.The
GraphQLApiResolver.updateoperation exists inazure-mgmt-apimanagementbut 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. Thetest_apim_core_servicescenario nowalso 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_servicecassette. A live recording on Developer SKU was blockedby transient
ManagementApiRequestFailedplatform-upgrade downtime; happy toregenerate a full live recording if preferred.
History Notes
[APIM]
az apim graphql resolver update: Add command to update a GraphQL API resolverThis checklist is used to make sure that common guidelines for a pull request are followed.