Draft: Add artifact registry hosted repository update mutation
What does this MR do and why?
Adds the hosted repository update mutation for Artifact Registry (monolith/S07 Step 3), on top of the S07 GraphQL foundation (!248967 (merged)).
Mutations::ArtifactRegistry::Repositories::Update addresses the repository by name (identity) and writes only visibility and description. name and format are immutable (ADR-009/022), so neither is a writable input. Only the fields the caller supplies are forwarded, so an omitted field is left untouched rather than cleared. It calls the S02 client update_repository and returns the updated ArtifactRegistryRepository plus the standard errors. All experiment (19.3), behind the dark artifact_registry_ui flag.
A flag-off update raises a top-level ResourceNotAvailable with no client call; an AR 403 renders a top-level ResourceNotAvailable; an update 404 surfaces a payload not-found error rather than a top-level error.
The frontend typedefs (graphql/typedefs.graphql) drop the local @client declaration of Mutation.artifactRegistryRepositoryUpdate, which the merged Vue write UI declared while there was no backend. Now that this MR adds the real server mutation, keeping the local declaration would collide during the Apollo schema build. The edit flow still runs on the local mock resolver through the remaining @client operation.
References
- Spec:
docs/specs/monolith/S07-repository-crud.md(Approved), Mutations - Plan:
docs/plans/monolith/2026-07-17-repository-crud.md(merged), Step 3 - Builds on the S07 foundation: !248967 (merged)
- Shared type and enums: !248690 (merged) (monolith/S04), merged
Screenshots or screen recordings
N/A. Schema only, behind a dark flag.
How to set up and validate locally
- Point the client at a local Artifact Registry service and enable the flag:
org = Organizations::Organization.first Gitlab.config.artifact_registry['api_url'] = 'http://127.0.0.1:8090' Feature.enable(:artifact_registry_ui, org) - Update an existing repository, sending only the writable fields:
mutation = <<~GQL mutation($name: String!, $visibility: ArtifactRegistryRepositoryVisibility, $description: String) { artifactRegistryRepositoryUpdate(input: { name: $name, visibility: $visibility, description: $description }) { repository { name format kind visibility description settings } errors } } GQL user = org.organization_users.first.user pp GitlabSchema.execute(mutation, variables: { 'name' => 'my-repo', 'visibility' => 'PRIVATE', 'description' => 'Updated' }, context: { current_user: user, current_organization: org }).to_h - Confirm the input exposes no writable
nameorformat; sending onlydescriptionleavesvisibilityuntouched; an update against a missing repository surfaces a payload not-found error (not a top-level error); and with the flag off the mutation raises a top-levelResourceNotAvailablewith no client call.
Request spec:
bundle exec rspec ee/spec/requests/api/graphql/mutations/artifact_registry/repositories/update_spec.rbMR acceptance checklist
Evaluate this MR against the MR acceptance checklist.