Make groups GraphQL query countable and add active argument
What does this MR do and why?
Related to Add `active` argument to `GroupsResolver` (#542571 - closed) and Add counts to tabs (#502494 - closed)
- Needed for &13781 (closed) and &17783 (closed)
- Make groups GraphQL query countable
- Add
activeargument- Defaults to
nilwhich returns all groups (no changes to existing behavior) - When
trueit returns only groups that are not pending deletion. Archived groups will also be excluded when we introduce group archiving in the future. - When
falseit returns only groups that are pending deletion. Archived groups will also be included when we introduce group archiving in the future.
- Defaults to
How to set up and validate locally
- Delete a group in group -> Settings -> General -> Advanced. This should put it in pending deletion state.
- Go to
/-/graphql-explorer - Run this query
{
groups(active: false) {
nodes {
fullName
}
count
}
}
- It should only return the group that is pending deletion
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.