Add issuable state count type for Project graphql
What does this MR do?
This adds the issue_status_counts
field to Project, which provides the ability to fetch the counts of issues for each status (Closed, open, all) via GraphQL.
It re-uses the Issues resolver arguments which allows the issue status counts to be filtered in the same way that issues are. To do this, I moved the resolver arguments into a shared file and prepended them into the resolvers.
An example query & response is:
{
project(fullPath: "root/autodevops-deploy") {
issueStatusCounts(search:"error") {
all
closed
opened
}
}
}
{
"data": {
"project": {
"issueStatusCounts": {
"all": 129,
"closed": 20,
"opened": 109
}
}
}
}
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Closes #232580 (closed)
Edited by Sean Arnold