Missing GraphQL functionality for issues list page
The issues list page is being refactored from Haml to Vue in https://gitlab.com/gitlab-org/gitlab/-/issues/322755. This epic lists missing GraphQL functionality required for the issues list page to be fully-GraphQL. ## Missing fields <details><summary>Done</summary> ~~The REST API returns `merge_requests_count`. The GraphQL Issue type is missing an equivalent `mergeRequestsCount` field~~ ✅ </details> ## Missing sort options <details><summary>Done</summary> <img src=/uploads/321684c3cd454b49c295633f6f58f321/Screenshot_2021-03-31_Issues___GitLab_org_GitLab.png width=200> There are some sort options available, e.g. ```graphql query { project(fullPath: "gitlab-org/gitlab") { issues (sort: UPDATED_DESC) { count } } } ``` ~~There are two missing sort options:~~ - `POPULARITY_ASC` and `POPULARITY_DESC` ✅ - `BLOCKING_ISSUES_ASC` and `BLOCKING_ISSUES_DESC` ✅ </details> ## Missing ability to reorder issues You cannot reorder issues ❌ Reordering issues is activated on the UI by selecting `Manual` from the sort dropdown. The REST API endpoint for this is `gitlab-org/gitlab/-/issues/1/reorder` ## Missing bulk update There is an `updateIssue` mutation to update an issue but none to update a collection of issues at once. ❌ In the UI, you can bulk update status, assignees, epic, milestone, iteration, labels, health status, and subscription by doing a server form submission. ## Missing filter functionality <details><summary>Done</summary> <img src=/uploads/c304586d885809dff58d73acf3f5080d/Screenshot_2021-03-26_Issues___GitLab_org_Plan.png width=200> You can filter with a query like: ```graphql query { project(fullPath: "gitlab-org/gitlab") { issues (authorUsername: "cngo") { count } } } ``` The following table documents what we can and cannot filter by for issues, and what the filter parameter name is: Some IDs are global but most of them in this resolver are RAW IDs | | filter key | none/any filtering | negated filters | | ------ | ------ | --- | --- | | iid | ✅ | n/a | ✅ | | Author | ✅ `authorUsername` | n/a | ✅ `authorUsername` | | Assignee | ✅ `assigneeUsername`. Can also search for multiple assignees with `assigneeUsernames` | ✅ `assigneeId:"Any"` and `assigneeId:"None"` | ✅ `assigneeUsernames` and `assigneeId`. No singular version. For one username send a single element in the list | | Milestone | ✅ `milestoneTitle` | ✅ `milestoneWildcardId:NONE`, `milestoneWildcardId:ANY`, `milestoneWildcardId:UPCOMING`, `milestoneWildcardId:STARTED`, NOT `Upcoming`, and NOT `Started` | ✅ `milestoneTitle` | | Iteration | ✅ `iterationId`. List of global IDs | ✅ `iterationWildcardId:ANY`, `iterationWildcardId:NONE` and `iterationWildcardId:CURRENT` | ✅ `iterationId` and `IterationWildcardId` | | Release | ✅ `releaseTag` | ✅ `releaseTagWildcardId:None` and `releaseTagWildcardId:Any` | ✅ `releaseTag` | | Label | ✅ `labelName` Can search for one label, but sometimes takes >2s to return a result. Use array for searching multiple labels. | ✅ `labelName:"Any"` and `labelName:"None"` | ✅ `labelName`. List of label names. | | My-Reaction | ✅ `myReactionEmoji` | ✅ `myReactionEmoji:NONE` and `myReactionEmoji:ANY` | ✅ `myReactionEmoji` | | Epic | ✅ `epicId` | ✅ `epicId:"Any"` and `epicId:"None"` | ✅ `epicId` | | Weight | ✅ `weight` | ✅ `weight:"Any"` and `weight:"None"` | ✅ `weight` | | Confidential | ✅ `confidential` | n/a | n/a | To filter by these properties, we need to provide an exact match. The following section documents whether we are able to search for these properties via GraphQL. </details> ## Missing search Release search ❌ - You can query for releases but it doesn't provide the ability to filter ```graphql query{ project(fullPath:"gitlab-org/gitlab"){ releases { nodes { name description } } } } ``` My-Reaction search ❌ - You cannot view or search for award emojis. The REST API endpoint is `https://gitlab.com/-/autocomplete/award_emojis` <details><summary>Done</summary> Author search ✅ ```graphql query{ project(fullPath:"gitlab-org/gitlab"){ projectMembers (search:"donald") { nodes { user { name username } } } } } ``` Milestone search ✅ ```graphql query{ project(fullPath:"gitlab-org/gitlab"){ milestones (searchTitle:"13", includeAncestors:true) { nodes { title } } } } ``` Iteration search ✅ ```graphql query{ project(fullPath:"gitlab-org/gitlab"){ iterations (title: "gitlab") { nodes { title } } } } ``` Label search ✅ ```graphql query{ project(fullPath:"gitlab-org/gitlab"){ labels(searchTerm:"debt",includeAncestorGroups:true) { nodes { title description } } } } ``` Epic search ✅ ```graphql query{ group(fullPath:"gitlab-org"){ epics(search:"pajamas") { nodes { title } } } } ``` Weight search ✅ - We can populate the autocomplete list with some numbers, and the user can type in a number if it's not there Confidential search ✅ - We can populate the autocomplete list with Yes and No </details>
epic