Add filtering option to `vulnerabilityGrades` field
What does this MR do and why?
This MR introduces letterGrade
argument for the Group#vulnerabilityGrades
, and InstanceSecurityDashboard#vulnerabilityGrades
fields.
Related to Improve the `group#vulnerabilityGrades` GraphQL... (#350110 - closed), and Improve the `instanceSecurityDashboard#vulnerab... (#350622 - closed).
Testing locally
Assuming you already have a group and vulnerable projects on your development environment, the following queries can be used to test this functionality;
For the group-level field
query getGradesUnderGroup {
group(fullPath: "group path") {
vulnerabilityGrades(includeSubgroups: true, letterGrade: F) {
grade
count
projects {
pageInfo {
endCursor
hasNextPage
}
nodes {
name
}
}
}
}
}
For the instance-level field
query getGradesForInstance {
instanceSecurityDashboard {
vulnerabilityGrades(letterGrade: F) {
grade
count
projects {
nodes {
name
}
}
}
}
}
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 Mehmet Emin INAC