Extend label GraphQL search with field list
What does this MR do and why?
This change extends the labels GraphQL search query with an optional searchIn
argument which affects the way we apply search via the searchTerm
argument.
By default the finder will look in both title and description fields. With the searchIn
argument we have a way to filter labels by title only.
How to set up and validate locally
- Go to a project and create 2 labels. One with title "what" and the another with description "what".
- Run these GraphQL queries in the GraphQL exploder: http://localhost:3000/-/graphql-explorer
Should return both labels (default behavior):
{
project(fullPath: "flightjs/flight") {
labels(searchTerm: "what") {
nodes {
title
description
}
}
}
}
Should return only one label:
{
project(fullPath: "flightjs/flight") {
labels(searchTerm: "what", searchIn: [TITLE]) {
nodes {
title
description
}
}
}
}
Related to #460112 (closed)
Edited by Adam Hegyi