summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/clusters_list/graphql/queries/get_agents.query.graphql
blob: 61989e00d9e3965c0b368266ddf5e01d095df910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"

query getAgents(
  $defaultBranchName: String!
  $projectPath: ID!
  $first: Int
  $last: Int
  $afterAgent: String
  $afterTree: String
  $beforeAgent: String
  $beforeTree: String
) {
  project(fullPath: $projectPath) {
    clusterAgents(first: $first, last: $last, before: $beforeAgent, after: $afterAgent) {
      nodes {
        id
        name
        webPath
        tokens {
          nodes {
            lastUsedAt
          }
        }
      }

      pageInfo {
        ...PageInfo
      }
    }

    repository {
      tree(path: ".gitlab/agents", ref: $defaultBranchName) {
        trees(first: $first, last: $last, after: $afterTree, before: $beforeTree) {
          nodes {
            name
            path
            webPath
          }

          pageInfo {
            ...PageInfo
          }
        }
      }
    }
  }
}