Skip to content

Allow to fetch related items on VSA GraphQL query

Felipe Cardozo requested to merge issue_410329 into master

What does this MR do and why?

Allow to query stage related issuables data using GraphQL

related to #410329 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Make sure you are on ultimate tier
  2. Start gdk and execute the following seed FILTER=customizable_cycle_analytics SEED_CUSTOMIZABLE_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu and take note of group path created.
  3. Execute the following GraphQL query using GROUP_PATH as path taken in previous step
{
  group(fullPath: GROUP_PATH) {
    valueStreams {
      nodes {
        name
        stages {
          name
          metrics(timeframe: { start: "2024-08-01", end: "2024-08-30"}) { // If needed adjust to the current month start date and end date
            items {
              nodes {
                duration
                endEventTimestamp
                record {
                  ... on Issue {
                    id
                    title
                  }
                  ... on MergeRequest {
                    id
                    title
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Issues and merge requests data should be present on each stage. To test non aggregated queries repeat the same steps, but for a project in FOSS mode.

Edited by Felipe Cardozo

Merge request reports

Loading