519111 - Add Project IDs to StageMetricsResolver
What does this MR do and why?
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. Adding it to the StageMetricsResolver will help with the alignment
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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.
Screenshots or screen recordings
How to set up and validate locally
- Open http://gdk.test:3000/-/graphql-explorer
- Run two queries, one with
groupresourceType and one withprojectresourceType
{
group(fullPath: "flightjs") {
id
valueStreams {
nodes {
stages(id: "gid://gitlab/Analytics::CycleAnalytics::Stage/18") {
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
}
}
}
}
}
}
}
}
{
project(fullPath: "flightjs/Flight") {
id
valueStreams {
nodes {
stages(id: "gid://gitlab/Analytics::CycleAnalytics::Stage/18") {
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
}
}
}
}
}
}
}
}
The group should return back data under valueStreams while project should throw an error
Related to #519111 (closed)
Edited by Amr Taha

