Skip to content

Add a GraphQL resolver to get pipeline counts by scope

Paul Gascou-Vaillancourt requested to merge 346284-pipeline-counts-resolver into master

What does this MR do and why?

This adds the project.pipelineCounts GraphQL endpoint for retrieving a project's pipeline counts by scope.

Here's an example query:

query PipelineCounts($fullPath: ID!) {
  project(fullPath: $fullPath) {
    pipelineCounts{
      all
      finished
      running
      pending
    }
  }
}

The response might look like this:

{
  "data": {
    "project": {
      "pipelineCounts": {
        "all": 195,
        "finished": 181,
        "running": 1,
        "pending": 6
      }
    }
  }
}

Screenshots or screen recordings

Screen_Shot_2022-01-20_at_4.30.37_PM

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 #346284 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading