Skip to content

Add job field to ProjectType

Avielle Wolfe requested to merge 372868-aw-add-job-to-project-type into master

What does this MR do and why?

This MR adds a job field to ProjectType so we can use GraphQL on the job detail pages

Screenshots or screen recordings

Query:

Screenshot_2022-09-08_at_17.14.40

Result:

Screenshot_2022-09-08_at_17.14.46

How to set up and validate locally

  1. Get a project path and a job ID from the same project.

  2. Using the Rails console, get the job global ID with job.to_global_id.

  3. Make the following query in /-/graphql-explorer

    query {
      project(fullPath: "PROJECT_PATH") {
        job(id: "GLOBAL_JOB_ID") {
          name
        }
      }
    }
  4. See that the result includes the job name

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #372868 (closed)

Merge request reports

Loading