#import "./label.fragment.graphql" query searchLabels($fullPath: ID!, $search: String, $isProject: Boolean = false) { group(fullPath: $fullPath) @skip(if: $isProject) { labels(searchTerm: $search, includeAncestorGroups: true, includeDescendantGroups: true) { nodes { ...Label } } } project(fullPath: $fullPath) @include(if: $isProject) { labels(searchTerm: $search, includeAncestorGroups: true) { nodes { ...Label } } } }