Missing GraphQL functionality for issues list page
The issues list page is being refactored from Haml to Vue in #322755 (closed). It cannot currently use GraphQL as it is missing some functionality, so it is using the REST API instead.
This issue lists the missing GraphQL functionality required for the issues list page.
Missing sort options
There are some sort options available, e.g.
query {
project(fullPath: "gitlab-org/gitlab") {
issues (sort: UPDATED_DESC) {
count
}
}
}
There are two missing sort options:
-
BLOCKING_ISSUES_ASC
andBLOCKING_ISSUES_DESC
-
POPULARITY_ASC
andPOPULARITY_DESC
Missing ability to 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.
You can bulk update: status, assignees, epic, milestone, iteration, labels, health status, subscription
Missing filter functionality
You cannot do NOT queries (e.g. assignee != cngo
).
You can filter with a query like:
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:
Author |
authorUsername
|
Assignee |
assigneeUsername . Can also search for multiple assignees with assigneeUsernames
|
Milestone |
milestoneTitle
|
Iteration |
iterationId
|
Release | |
Label |
labelName Can search for one label, but sometimes takes >2s to return a result. |
My-Reaction | |
Epic |
epicId
|
Weight | |
Confidential |
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.
Author search
query{
project(fullPath:"gitlab-org/gitlab"){
projectMembers (search:"donald") {
nodes {
user {
name
username
}
}
}
}
}
Milestone search
query{
project(fullPath:"gitlab-org/gitlab"){
milestones (searchTitle:"13", includeAncestors:true) {
nodes {
title
}
}
}
}
Iteration search
query{
project(fullPath:"gitlab-org/gitlab"){
iterations (title: "gitlab") {
nodes {
title
}
}
}
}
Release search
- You can query for releases but it doesn't provide the ability to filter
query{
project(fullPath:"gitlab-org/gitlab"){
releases {
nodes {
name
description
}
}
}
}
Label search
query{
project(fullPath:"gitlab-org/gitlab"){
labels(searchTerm:"debt",includeAncestorGroups:true) {
nodes {
title
description
}
}
}
}
My-Reaction search
- You cannot view or search for award emojis. The REST API endpoint is
https://gitlab.com/-/autocomplete/award_emojis
Epic search
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