Skip to content

Implement VSD GraphQL query

Adam Hegyi requested to merge 402997-implement-vsd-graphql-query into master

What does this MR do and why?

This MR implements the value stream dashboard overview count aggregation query and exposes the data via GraphQL.

GraphQL query:


{
  group(fullPath: "gitlab-org") {
    valueStreamDashboardUsageOverview(identifier: PROJECTS, timeframe: { start: "2021-01-01", end: "2023-08-31" }) {
      identifier
      count
      recordedAt
    }
  }
}

Database

Query with data (produced by invoking Analytics::ValueStreamDashboard::CountWorker with PG.ai):

How to verify

  1. Ensure that you're on ultimate.
  2. Find the gitlab-org group and create some test counts.
group = Group.find_by_path("gitlab-org")
FactoryBot.create(:value_stream_dashboard_count, namespace: group, count: 500, recorded_at: "2023-08-20")
  1. Invoke the graphql query mentioned above

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

Edited by Adam Hegyi

Merge request reports