Add a `personal` argument to `Query.projects`
requested to merge gitlab-community/gitlab:450189-add-personal-argument-to-query-projects into master
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.
- Run gdk. There are already sample projects including a personal project in the gdk.
- Open GitLab(local), and sign in.
- Open GraphQL Explorer(local).
- 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
}
}
}
- 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 inPersonal
tab on GitLab(local).)
{
projects(personal: true) {
nodes {
id
name
visibility
}
}
}
- If you do same things after you signed out from GitLab, it returns same
public
projects in both cases regardless of passing an argumentpersonal
. (It returns 11 projects in my initial gdk) This behavior comes from a ProjectsFinder's specification.
Related to #450189 (closed)
Edited by Yasutaka Kono