Add GraphQL for group usage quotas for CI usage historical data by month/project
Proposal
In order to support #341509 (closed), we need a new end point for the group quotas page, which matches the implementation in the users usage quota: #332069 (closed)
The GraphQL response for CI minutes usage:
// ciMinutesUsage.nodes
[
{
"month": "January",
"minutes": 310,
"projects": [
{ "name": "Project-1", "minutes": 100 },
{ "name": "Project-2", "minutes": 120 },
{ "name": "Project-3", "minutes": 90 },
],
},
{
"month": "February",
"minutes": 310,
"projects": [
{ "name": "Project-1", "minutes": 100 },
{ "name": "Project-2", "minutes": 120 },
{ "name": "Project-3", "minutes": 90 },
],
},
];
The example GraphQL query
query {
ciMinutesUsage(group: 'gitlab-org') {
nodes {
month
minutes
projects {
nodes {
name
minutes
}
}
}
}
}
Technical details
Add a group
filter to the ci_minutes_usage
field on EE::QueryType
. This may require the creation of a new resolver.
Edited by Avielle Wolfe