#import "~/runner/graphql/list/list_item.fragment.graphql"
#import "~/graphql_shared/fragments/page_info.fragment.graphql"

query getGroupRunners(
  $groupFullPath: ID!
  $before: String
  $after: String
  $first: Int
  $last: Int
  $paused: Boolean
  $status: CiRunnerStatus
  $type: CiRunnerType
  $search: String
  $sort: CiRunnerSort
) {
  group(fullPath: $groupFullPath) {
    id # Apollo required
    runners(
      membership: DESCENDANTS
      before: $before
      after: $after
      first: $first
      last: $last
      paused: $paused
      status: $status
      type: $type
      search: $search
      sort: $sort
    ) {
      edges {
        webUrl
        editUrl
        node {
          ...ListItem
          projectCount # Used to determine why some project runners can't be deleted
        }
      }
      pageInfo {
        __typename
        ...PageInfo
      }
    }
  }
}
