Create and expose MergeTrains::Train Type and Resolver
What does this MR do and why?
This MR is a part of the Merge Trains Visualization MVC and adds the following:
- MergeTrains::Train graphql type and policy
- MergeTrains::Trains graphql resolver and policy
- MergeTrains::Car policy as it was needed for the resolver
-
merge_trains
field on ProjectType
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
- Enable the
merge_trains_viz
feature flagFeature.enabled(:merge_trains_viz)
- Ensure that you are using the Premium or Ultimate edition
- Enable Merge Trains for your testing project
- Open the graphql explorer and test the queries
Sample Query
{
project(fullPath: "namespace49/project-49") {
id
mergeTrains(status: ACTIVE, targetBranches: ["sherlock", "master"]) {
count
nodes {
targetBranch
cars {
nodes {
status
mergeRequest {
title
}
}
}
}
}
}
}
Related to #458730 (closed), #458731 (closed), #458735 (closed)
Edited by Panos Kanellidis