Add ids argument for descendant groups

What does this MR do and why?

This merge request adds a new feature to filter groups by their IDs in a GraphQL query. The changes include:

  1. Adding a new argument called 'ids' to the NestedGroupsResolver class, which allows users to provide a list of group IDs to filter the results.
  2. Updating the API documentation to include information about the new 'ids' filter option.
  3. Adding a new test case to verify that the 'ids' filter works correctly when querying for specific groups.

These changes enhance the flexibility of group queries by allowing users to retrieve specific groups by their IDs, in addition to the existing search and ownership filters.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Description UI
Ids argument for descendant groups Screenshot 2025-02-24 at 12.50.10.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go to graphql-explorer

  2. Test the query:

    {
      group(fullPath: "path-to-agroup") {
        descendantGroups(ids: [list of gids]) {
          nodes {
            name
            id
          }
        }
      }
    }

Related to #520943 (closed)

Merge request reports

Loading