Add GraphQL manifest referrers connection (S06 Phase 2 container manifest detail plan: step 14/15)
What does this MR do and why?
Step 14 of 15 in the "S06 Phase 2 container manifest detail" plan. Backend-only GraphQL, no UI.
This adds a referrers keyset connection field on the ArtifactRegistryManifestDetails GraphQL type (added in Step 13), backed by a new resolver Resolvers::ArtifactRegistry::ManifestReferrersResolver.
Referrers are the manifests in the same image that name this manifest as their subject (the OCI referrers relationship). The connection returns the existing ArtifactRegistryManifest element type unwidened: a referrer is an ordinary manifest, and the three fields the referrers table renders (digest, artifact type, published date) are already among that type's seven fields, so nothing is added to the element type.
The resolver mirrors VersionFilesResolver (a sub-connection on a presenter-wrapped detail type). It reads @object (the ManifestPresenter from Step 13) for the repository, organization, image id, and digest, and calls the client's manifest_referrers read (added in Step 12). It uses the shared ArtifactRegistry::PaginatesLists keyset adapter, the same pager contract as the merged manifests connection, capped at 20 rows per page (MAX_PAGE_SIZE). It bounds aliased re-selection to one referrers read per operation via FieldCallCount limit 1.
Error and empty behavior mirrors the sibling connections:
- A manifest deleted between the two reads resolves the connection null.
- A remote repository's contractually-empty referrers list resolves to an empty connection, distinct from a null one (no referrers vs a failed read).
- 401/403/404 resolve null (existence-hiding) while the manifest still renders.
- 429/5xx/other 4xx surface a top-level service-unavailable error with
request_idpreserved. - Transport failures and timeouts surface service-unavailable.
The field is declared experiment ahead of GA, so it is invisible in introspection_result_no_deprecated.json; only introspection_result.json and the GraphQL reference docs moved. Regenerated GraphQL artifacts are included.
Feature flag artifact_registry_ui gates the field via the base resolver. No changelog trailer while the flag is off; the field description is not translated.
This completes the GraphQL schema surface for the container manifest detail page. Step 15 (a later MR, gated on the AR endpoints being served) connects the Vue view onto the real schema.
One behavior worth naming: ArtifactRegistryManifest declares digest, mediaType, and size non-null, and the row value object passes AR's keys through unvalidated, so a malformed referrer row missing digest nulls that one node and raises a top-level error rather than nulling the whole connection (a spec pins this blast radius). The merged manifests connection is equally undefended; the only referrer-family field that filters malformed rows is ManifestDetails#children, and widening the shared element type is out of this MR's scope. This MR also corrects a stale subjectDigest note on ManifestType and its value object that mounting the type on this second connection made wrong.
References
- Work item: #629093 (closed)
- Plan (Step 14): https://gitlab.com/gitlab-org/ops/artifact-registry/-/blob/82564515acdc7e29e2e2cd72a179496e63f4af73/docs/plans/monolith/2026-09-08-container-manifest-detail.md
- Contract (S17 "Manifest reads (container-redesign fast-follow)"): gitlab-org/ops/artifact-registry!2317 (merged)
- Stacked on Step 13: !255669 (merged)
How to set up and validate locally
Expected to report 0 failures (44 examples across the request spec and the type spec's added field assertion):
# request spec (needs VITE_ENABLED=true) plus the manifest details type spec
VITE_ENABLED=true bundle exec rspec \
ee/spec/requests/api/graphql/organizations/artifact_registry_manifest_referrers_spec.rb \
ee/spec/graphql/types/artifact_registry/manifest_details_type_spec.rbScreenshots or screen recordings
No UI. Backend GraphQL schema only, so none apply.