Allow to query value streams with stages on GraphQL
What does this MR do and why?
Add GraphQL endpoint to query value streams and its stages for groups and projects.
related to #409995 (closed)
How to set up and validate locally
Value streams can be queried on Premium or Foss tiers. We need to validate both. We have some key points between both tiers:
- At the foss level we can only query a project pre-built value stream called
default
- With Premium we can query custom value streams for both project and groups
Foss level
- Start the instance in foss mode
- Create any project and take a note of its full path
- Run the query below
query projectValueStreams {
project(fullPath: "PROJECT_PATH") {
valueStreams {
nodes {
id
name
stages {
name
startEventIdentifier
endEventIdentifier
}
}
}
}
}
The results should show the default pre-built value stream with pre-built stages
. The global id also should point to default
.
EE level
- Restart the instance on EE mode
- Create a group with some custom value streams or run the seed
FILTER=customizable_cycle_analytics SEED_CUSTOMIZABLE_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu
- Run the following query
query groupValueStreams {
group(fullPath: "GROUP_PATH") {
valueStreams {
nodes {
id
name
stages {
name
startEventIdentifier
endEventIdentifier
startEventLabel {
title
}
endEventLabel {
title
}
}
}
}
}
}
It should return custom value streams with custom stages. To test project endpoints on EE you can repeat the same steps from the previous section.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Felipe Cardozo