Skip to content

Instantly share code, notes, and snippets.

@shairyar
Last active July 21, 2023 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shairyar/824fd3e82890ca676270885738326c7f to your computer and use it in GitHub Desktop.
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) {
app(id: $appId) {
id
paginatedExceptionIncidents(
namespaces: $namespaces
marker: $markerId
limit: $limit
state: $state
offset: $offset
order: $order
) {
total
rows {
...ExceptionIncidentRow
__typename
}
__typename
}
__typename
}
}
fragment ExceptionIncidentRow on ExceptionIncident {
id
number
count
perMarkerCount(marker: $markerId)
lastOccurredAt
actionNames
exceptionName
state
namespace
firstBacktraceLine
errorGroupingStrategy
severity
}
@shairyar
Copy link
Author

query params

{
  "appId": "<APP-ID>",
  "namespaces": [
    "web",
    "public",
    "admin"
  ],
  "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