#import "./milestone.fragment.graphql" query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = false) { group(fullPath: $fullPath) @skip(if: $isProject) { id milestones(searchTitle: $search, includeAncestors: true, includeDescendants: true) { nodes { ...Milestone } } } project(fullPath: $fullPath) @include(if: $isProject) { id milestones(searchTitle: $search, includeAncestors: true) { nodes { ...Milestone } } } }