#import "./iteration.fragment.graphql"

query searchIterations($fullPath: ID!, $search: String, $id: ID, $isProject: Boolean = false) {
  group(fullPath: $fullPath) @skip(if: $isProject) {
    iterations(title: $search, id: $id, includeAncestors: true) {
      nodes {
        ...Iteration
      }
    }
  }
  project(fullPath: $fullPath) @include(if: $isProject) {
    iterations(title: $search, id: $id, includeAncestors: true) {
      nodes {
        ...Iteration
      }
    }
  }
}
