#import "./board_epic.fragment.graphql"

query BoardEE(
  $fullPath: ID!
  $boardId: ID!
  $issueFilters: BoardIssueInput
  $isGroup: Boolean = false
  $isProject: Boolean = false
  $after: String
) {
  group(fullPath: $fullPath) @include(if: $isGroup) {
    board(id: $boardId) {
      epics(first: 20, issueFilters: $issueFilters, after: $after) {
        edges {
          node {
            ...BoardEpicNode
            userPreferences {
              collapsed
            }
          }
        }
        pageInfo {
          endCursor
          hasNextPage
        }
      }
    }
  }
  project(fullPath: $fullPath) @include(if: $isProject) {
    board(id: $boardId) {
      epics(first: 20, issueFilters: $issueFilters, after: $after) {
        edges {
          node {
            ...BoardEpicNode
            userPreferences {
              collapsed
            }
          }
        }
        pageInfo {
          endCursor
          hasNextPage
        }
      }
    }
  }
}
