Add ability to search labels by title-only in GraphQL
In GraphQL, we can search for a label:
// https://gitlab.com/-/graphql-explorer
{
project(fullPath: "gitlab-org/gitlab") {
labels(searchTerm: "group") {
nodes {
title
}
}
}
}
However, the search is performed across the title and description. This can produce many unwanted results if the user expects the search to only match on the label title.
Proposal
We should add the ability to search labels by title only.
We can currently search epics by epic title only:
// searches epics by title only
{
group(fullPath: "gitlab-org") {
epics(search: "pajamas", in: [TITLE]) {
nodes {
id
title
}
}
}
}
We could similarly add the ability to search labels by title-only with the following query:
// proposal to search labels by title-only
{
project(fullPath: "gitlab-org/gitlab") {
labels(searchTerm: "group", in: [TITLE]) {
nodes {
title
}
}
}
}
Acceptance criteria
- The user can search for labels by title-only in GraphQL
Edited by Coung Ngo