Batch-load job artifacts in CiJob.artifacts

Implements all three review follow-ups from #629124 (closed), raised during review of !254893 (merged):

  1. Types::Ci::JobType#artifacts now batch-loads job_artifacts with BatchLoader::GraphQL, preloading through the association so inverse_of keeps artifact.job loaded and downloadPath costs no extra query. This removes the one-query-per-job N+1 in the get_pipeline artifacts facet and everywhere else CiJob.artifacts is selected. A resolver-level preload was not possible: the pipeline jobs collection mixes bridges and generic commit statuses, which have no job_artifacts association. QueryRecorder examples pin the query count at the MCP facet and at the GraphQL .jobs.artifacts + downloadPath path with a mixed build-and-bridge pipeline.
  2. Both facet tools, get_job and get_pipeline, gained an expired-artifact example that asserts expired: true and checks the timestamp serialization.
  3. The get_pipeline docs now describe the first row as counting jobs rather than artifacts in the artifacts facet, using the reviewer's suggested wording verbatim.

Independent of !254894 (merged) and merges on its own.

Closes #629124 (closed)

Edited by Tian Gao

Merge request reports

Loading
Loading