Add GraphQL manifest details type and resolver (S06 Phase 2 container manifest detail plan: step 13/15)

What does this MR do and why?

This is Step 13 of 15 in the S06 Phase 2 container manifest detail plan for GitLab Artifact Registry. It exposes the single-manifest read over GraphQL. No UI ships here, though it does include small frontend cleanups (removing local Apollo typedefs and the mock resolver the schema now owns).

Step 12 (!255569 (merged), which this MR is stacked on) added the Ruby client reads and the ArtifactRegistry::ManifestDetail value object. This MR puts that read behind a GraphQL field. Step 14 will add the referrers connection, and Step 15 connects the Vue view.

It adds a manifest(artifactId: ID!, digest: String!) field on the ArtifactRegistryRepositoryDetails type, backed by a new Resolvers::ArtifactRegistry::ManifestResolver, plus three new object types:

  • ArtifactRegistryManifestDetails: the detail resource, with digest, mediaType, artifactType, subjectDigest, size, createdAt, the architecture/os/osVariant platform triple, tags + tagsCount, children + childrenCount, parentDigests + parentsCount, referrersCount, and annotations.
  • ArtifactRegistryManifestPlatform: a platform child of an index (digest + the platform triple).
  • ArtifactRegistryManifestAnnotation: an OCI key/value pair.

The field also gets a presenter, ArtifactRegistry::ManifestPresenter, that pairs the manifest value object with the repository, organization, and image id, so the Step 14 referrers connection mounting on the detail type can re-issue its own read (which is keyed on the image id + digest pair).

The field takes both the image id and the digest as plain ID/String arguments, not GitLab global IDs. The AR route is keyed on .../images/:image_id/manifests/:digest and carries those values verbatim; neither one alone reaches a manifest. This "two primitives at every boundary" is a named, accepted trade-off from the plan. For the same reason the field mounts on the repository detail type rather than nesting under the image element: the AR route addresses a manifest by image id + digest directly under the format segment, and nesting under image would serialize two reads for no contract reason.

The resolver composes ResolvesOnRepository and inherits AcquiresClient and RendersErrors from the AR base resolver, so it acquires its client through the cached helper (ADR-014) and maps errors through the shared concern. It returns null without calling AR when the repository is not a container format (holds packages), and it bounds aliased re-selection to one manifest read per operation via FieldCallCount limit 1.

Error behavior mirrors the sibling single-artifact fields: 401/403/404 resolve the field null (existence-hiding) while the repository still renders; 429/5xx/other 4xx surface a top-level service-unavailable error with request_id preserved; transport failures and timeouts surface service-unavailable.

Annotations serialize as a list of key/value pairs rather than a JSON map, so a null annotations map (no key on push) stays distinguishable from an empty one ({} on push renders as an empty list).

Every field is declared experiment ahead of GA, so the field is invisible in introspection_result_no_deprecated.json; only introspection_result.json and the GraphQL reference docs moved. The two arguments are required, and GraphQL implements experiment through the deprecation mechanism, which cannot apply to a required argument, so they carry no marker, matching the sibling image and version single-artifact resolvers. Regenerated GraphQL artifacts are included.

This is behind the artifact_registry_ui feature flag. With the flag off, the field stays in the schema but resolves null without calling the client (the base resolver enforces this). No changelog trailer while the flag is off, and field descriptions are not translated (no i18n).

Two notes on scope against the plan. ManifestPresenter is not in the plan's Step 13 file list: it is introduced here because it is the field's presented object and it closes a DeclarativePolicy.class_for hole, and its required image_id keyword is what the Step 14 referrers connection reads. The request spec landed at .../graphql/organizations/artifact_registry_manifest_spec.rb rather than the plan's .../graphql/artifact_registry/manifest_spec.rb, matching where all sibling AR request specs live and the "mirror the folder structure" rule; the plan path is stale.

References

How to set up and validate locally

The request spec needs VITE_ENABLED=true; the two run together fine. Each is expected to report 0 failures.

# type spec: field set, types, nullability, experiment marking (22 examples)
bundle exec rspec ee/spec/graphql/types/artifact_registry/manifest_details_type_spec.rb

# request spec: the manifest field end to end over stubbed AR HTTP (26 examples)
VITE_ENABLED=true bundle exec rspec ee/spec/requests/api/graphql/organizations/artifact_registry_manifest_spec.rb

The request spec is the primary vehicle: it covers both container formats, all detail fields including the platform triple and children, the null-vs-empty annotations distinction, the single-image-child variant, packages-repository resolving null with no AR call, silent 401/403/404, server error and non-404 client error with request_id, transport failure and timeout, feature-flag-off, non-member, anonymous, and the aliased-selection FieldCallCount limit. The type spec statically verifies the field set, types, nullability, and the experiment marking.

Screenshots or screen recordings

No UI ships in this MR. It is a backend GraphQL schema change only, so no screenshots apply.

Edited by Narendran

Merge request reports

Loading
Loading