summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/alert_management/graphql/queries/get_alerts.query.graphql
blob: bc7e51a2e90941acfaa2e6cb9eb416317f035992 (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
#import "../fragments/list_item.fragment.graphql"

query getAlerts(
  $projectPath: ID!
  $statuses: [AlertManagementStatus!]
  $sort: AlertManagementAlertSort
  $firstPageSize: Int
  $lastPageSize: Int
  $prevPageCursor: String = ""
  $nextPageCursor: String = ""
  $searchTerm: String = ""
  $assigneeUsername: String = ""
) {
  project(fullPath: $projectPath) {
    alertManagementAlerts(
      search: $searchTerm
      assigneeUsername: $assigneeUsername
      statuses: $statuses
      sort: $sort
      first: $firstPageSize
      last: $lastPageSize
      after: $nextPageCursor
      before: $prevPageCursor
    ) {
      nodes {
        ...AlertListItem
      }
      pageInfo {
        hasNextPage
        endCursor
        hasPreviousPage
        startCursor
      }
    }
  }
}