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

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