Skip to content

detections

Query

Finds detections, which are objects detected by the Worlds system, based on a set of filters.

Response

Returns DetectionConnection

Arguments

NameTypeDescription
filterFilterDetectionInput!

Filter detections based on the originating device, time period, etc.

firstInt!

Returns the first n elements from the list.

Default: 20

afterString

Returns the elements in the list that come after the specified cursor.

sort[DetectionsSort!]!

The field and direction by which to sort the results

Default: [{ field: DETECTION_TIME, direction: ASC }, { field: TRACK_ID, direction: ASC }]

Example

query detections(
$filter: FilterDetectionInput!,
$first: Int!,
$after: String,
$sort: [DetectionsSort!]!
) {
detections(
filter: $filter,
first: $first,
after: $after,
sort: $sort
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
timestamp
metadata
createdAt
updatedAt
direction
}
cursor
}
totalCount
}
}