Add ValueStreamStageMetrics.projectIds GraphQL query param
What does this MR do and why?
In the process of converting the Value stream analytics charts to GraphQL (!180607 (closed)), I noticed that we don't have the ability to filter by project IDs on the group level. Since the resolver shares the same data fetching logic as the REST api, I simply added the new resolver param to make it accessible to the frontend:
References
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
- Seed VSA data
FILTER=customizable_cycle_analytics SEED_CUSTOMIZABLE_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu
- Create an extra project in the test group that is created from the data seeder
- Run GraphQL requests scoped to either project and ensure you receive the expected data. Sample request:
{
group(fullPath: "flightjs") {
id
valueStreams {
nodes {
stages(id: "gid://gitlab/Analytics::CycleAnalytics::Stage/19") {
id
name
metrics(
projectIds: ["gid://gitlab/Project/7", "gid://gitlab/Project/24"]
timeframe: {
start: "2024-11-01",
end: "2025-01-31"
}
) {
series {
averageDurations {
date
value
}
}
}
}
}
}
}
}
Related to #498181 (closed)
