Skip to content

Instantly share code, notes, and snippets.

@shairyar
Last active August 28, 2025 04:51
Show Gist options
  • Select an option

  • Save shairyar/824fd3e82890ca676270885738326c7f to your computer and use it in GitHub Desktop.

Select an option

Save shairyar/824fd3e82890ca676270885738326c7f to your computer and use it in GitHub Desktop.
GraphQL query to fetch incidents logged in AppSignal
query PaginatedExceptionIncidentsQuery($appId: String!, $namespaces: [String], $markerId: String, $limit: Int, $offset: Int, $state: IncidentStateEnum, $order: IncidentOrderEnum, $exceptionQuery: ExceptionIncidentQueryEnum, $timeframe: TimeframeEnum, $start: DateTime, $end: DateTime) {
app(id: $appId) {
id
paginatedExceptionIncidents(
namespaces: $namespaces
marker: $markerId
limit: $limit
state: $state
offset: $offset
order: $order
exceptionQuery: $exceptionQuery
timeframe: $timeframe
start: $start
end: $end
) {
total
rows {
...ExceptionIncidentRow
__typename
}
__typename
}
__typename
}
}
fragment ExceptionIncidentRow on ExceptionIncident {
id
number
count
scopedCount
lastOccurredAt
actionNames
exceptionName
state
namespace
firstBacktraceLine
errorGroupingStrategy
source
severity
...ExceptionIntegrationsFragment
__typename
}
fragment ExceptionIntegrationsFragment on ExceptionIncident {
integrations {
... on Jira {
name
issues {
...JiraIssue
__typename
}
__typename
}
__typename
}
__typename
}
fragment JiraIssue on JiraIssue {
id
title
description
url
remoteId
__typename
}
@shairyar
Copy link
Author

shairyar commented Jul 21, 2023

query params

{
  "appId": "<APP-ID>",
  "namespaces": [],
  "markerId": "<DEPLOYMENT-ID>",
  "offset": 0,
  "limit": 50
}

Here is the query to fetch deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment