Add projectIds to ValueStreamStageMetrics resolver
Problem
Value stream stage metrics do not support filtering by project ID when using GraphQL. This does not match the functionality of the REST api currently used on the page.
Solution
In order to update the VSA frontend to GraphQL, we will need to add projectIds to group.valueStreams.stages.metrics:
{
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
This was attempted in !180785 (closed), but it was decided that some refactoring would be necessary to achieve the desired outcome (comment). The solution should ensure that the projectIds query param is only applicable for group namespaces.