diff options
Diffstat (limited to 'app/assets/javascripts/incidents/graphql/queries')
-rw-r--r-- | app/assets/javascripts/incidents/graphql/queries/get_count_by_status.query.graphql | 9 | ||||
-rw-r--r-- | app/assets/javascripts/incidents/graphql/queries/get_incidents.query.graphql | 52 |
2 files changed, 61 insertions, 0 deletions
diff --git a/app/assets/javascripts/incidents/graphql/queries/get_count_by_status.query.graphql b/app/assets/javascripts/incidents/graphql/queries/get_count_by_status.query.graphql new file mode 100644 index 00000000000..0b784b104a8 --- /dev/null +++ b/app/assets/javascripts/incidents/graphql/queries/get_count_by_status.query.graphql @@ -0,0 +1,9 @@ +query getIncidentsCountByStatus($searchTerm: String, $projectPath: ID!, $issueTypes: [IssueType!]) { + project(fullPath: $projectPath) { + issueStatusCounts(search: $searchTerm, types: $issueTypes) { + all + opened + closed + } + } +} diff --git a/app/assets/javascripts/incidents/graphql/queries/get_incidents.query.graphql b/app/assets/javascripts/incidents/graphql/queries/get_incidents.query.graphql new file mode 100644 index 00000000000..0f56e8640bd --- /dev/null +++ b/app/assets/javascripts/incidents/graphql/queries/get_incidents.query.graphql @@ -0,0 +1,52 @@ +query getIncidents( + $projectPath: ID! + $issueTypes: [IssueType!] + $sort: IssueSort + $status: IssuableState + $firstPageSize: Int + $lastPageSize: Int + $prevPageCursor: String = "" + $nextPageCursor: String = "" + $searchTerm: String +) { + project(fullPath: $projectPath) { + issues( + search: $searchTerm + types: $issueTypes + sort: $sort + state: $status + first: $firstPageSize + last: $lastPageSize + after: $nextPageCursor + before: $prevPageCursor + ) { + nodes { + iid + title + createdAt + state + labels { + nodes { + title + color + } + } + assignees { + nodes { + name + username + avatarUrl + webUrl + } + } + statusPagePublishedIncident + } + pageInfo { + hasNextPage + endCursor + hasPreviousPage + startCursor + } + } + } +} |