Skip to content

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.

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

image image

How to set up and validate locally

  1. Sign in to your local GitLab instance with a non-admin user that is a member of at least one public group.
  2. Go to http://localhost:3000/-/graphql-explorer.
  3. Run the following GQL Query
query {
  groups(allAvailable: <boolean>) {
    nodes {
      name
      fullPath
    }
  }
}
  1. When true, the query should return all public groups. Otherwise, it should only return the groups where the user is a member of.
  2. 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

Merge request reports

Loading