Skip to content

Add a `personal` argument to `Query.projects`

What does this MR do and why?

As described in #450189 (closed), added a personal argument to Query.projects of GraphQL to render the projects in the Personal tab.

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.

How to set up and validate locally

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

  1. Run gdk. There are already sample projects including a personal project in the gdk.
  2. Open GitLab(local), and sign in.
  3. Open GraphQL Explorer(local).
  4. Input a query below in the left textarea to confirm the number of current user's projects, and click an execute button. (It returns 18 projects in my initial gdk)
{
  projects {
    nodes {
      id
      name
      visibility
    }
  }
}
  1. Input a query below in the left textarea to confirm the number of current user's personal projects when an argument personal is passed, and click an execute button. (It returns one project in my initial gdk. It's a same project as the one in Personal tab on GitLab(local).)
{
  projects(personal: true) {
    nodes {
      id
      name
      visibility
    }
  }
}
  1. If you do same things after you signed out from GitLab, it returns same public projects in both cases regardless of passing an argument personal. (It returns 11 projects in my initial gdk) This behavior comes from a ProjectsFinder's specification.

Related to #450189 (closed)

Edited by Yasutaka Kono

Merge request reports