Add `all_available` argument to Groups GQL query
What does this MR do and why?
Add support for all_available
argument to the Groups GQL query
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- Closes #505045 (closed)
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
- Sign in to your local GitLab instance with a non-admin user that is a member of at least one public group.
- Go to http://localhost:3000/-/graphql-explorer.
- Run the following GQL Query
query {
groups(allAvailable: <boolean>) {
nodes {
name
fullPath
}
}
}
- When true, the query should return all public groups. Otherwise, it should only return the groups where the user is a member of.
-
Special Case: When unauthenticated, the query should always return all public groups regardless of the argument value (always treated as
true
).
Edited by Shane Maglangit