Skip to content

Reuse existing projects & groups resolvers for Organization

Abdul Wadood requested to merge 437681-add-search-organization-projects into master

What does this MR do and why?

Here we have changed the base class of Organizations::GroupsResolver and Organizations::ProjectsResolver from BaseResolver to GroupsResolver and ProjectsResolver respectively to use the existing functionalities of both the resolvers.

We also need a search argument in the Organizations::ProjectsResolver and changing its base class added this argument as well.

The GroupsResolver was missing the sort argument which has been added as well.

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.

Query plans

Queries haven't changed as I have just moved the sorting from the resolver to the finder and used existing methods for sorting. These plans are just for reference:

How to set up and validate locally

Run the following GraphQL query on https://gdk.test:3000/-/graphql-explorer:

{
  organization(id: "gid://gitlab/Organizations::Organization/1") {
    id
    projects(sort: "id_desc", search: "Random") {
      nodes {
        id
        path
      }
    } 
  }
}

Do the same for groups.

Related to #440943 (closed) #437681 (closed)

Edited by Abdul Wadood

Merge request reports