Skip to content

VSD Refactor API requests from REST to graphql

What does this MR do and why?

This MR introduces grapqhl queries for the VSD flow metrics and DORA metrics. These will eventually replace the legacy REST api requests currently in use.

This MR:

  • introduces the vsd_graphql_dora_and_flow_metrics feature flag to toggle the behaviour
  • adds graphql queries and related fragments
  • adds utils to extract the graphql data, transforming it ready for use in the charts and table
  • updates jest tests

Vulnerability counts were already introduced via graphql in !119437 (merged), so those continue to be requested alongside REST api requests (when the feature flag is off) and alongside the other graphql queries.

Screenshots or screen recordings

No visual changes

How to set up and validate locally

You will need a GitLab Ultimate license

  1. Enable the vsd_graphql_dora_and_flow_metrics feature flag
    Feature.enable(:vsd_graphql_dora_and_flow_metrics)
  2. Create a group
  3. Seed cycle analytics data
  4. Seed dora metrics data
  5. Visit the Value streams dashboard

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

Edited by Ezekiel Kigbo

Merge request reports