#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "./epic.fragment.graphql"
#import "./issue.fragment.graphql"

query childItems(
  $fullPath: ID!
  $iid: ID
  $pageSize: Int = 100
  $epicEndCursor: String = ""
  $issueEndCursor: String = ""
) {
  group(fullPath: $fullPath) {
    id
    path
    fullPath
    epic(iid: $iid) {
      ...RelatedTreeBaseEpic
      children(first: $pageSize, after: $epicEndCursor) {
        edges {
          node {
            ...EpicNode
          }
        }
        pageInfo {
          ...PageInfo
        }
      }

      issues(first: $pageSize, after: $issueEndCursor) {
        edges {
          node {
            ...IssueNode
          }
        }
        pageInfo {
          ...PageInfo
        }
      }
    }
  }
}
