Skip to main content

Querying events

events returns events your board hosts. Use it to list active events, drill into a single event's dates and tickets, or find drafts you haven't published yet.

All examples require a JWT — get one from the homepage first. The API key needs the events:read scope.

List events

query listEvents($first: Int) {
events(first: $first) {
totalCount
nodes {
id
name
registrationEnd
isActive
isCompleted
}
pageInfo {
hasNextPage
endCursor
}
}
}

Sortable fields: name, registrationEnd, createdDate. Filterable fields: id, isActive, isCompleted.

Default page size is 25.

Get one event by ID

There's no top-level eventById query. Filter events by id — the response is still a connection, but with at most one node.

query getEventById($id: UUID!) {
events(where: { id: { eq: $id } }, first: 1) {
nodes {
id
name
description
registrationEnd
isActive
isCompleted
hasLocation
}
}
}

Filter by lifecycle state

Active (published, not yet completed) events:

query activeEvents {
events(
where: { and: [{ isActive: { eq: true } }, { isCompleted: { eq: false } }] }
order: [{ registrationEnd: ASC }]
first: 25
) {
totalCount
nodes {
id
name
registrationEnd
}
}
}

Drafts (not yet published):

query draftEvents {
events(
where: { and: [{ isActive: { eq: false } }, { isCompleted: { eq: false } }] }
order: [{ createdDate: DESC }]
first: 25
) {
nodes {
id
name
}
}
}

Expand dates, location, ticket specifications

Because events projects nested fields, you can pull most of an event in a single round-trip. Keep the selection tight — every nested field adds work to the underlying SQL.

query expandedEvent($id: UUID!) {
events(where: { id: { eq: $id } }, first: 1) {
nodes {
id
name
description
registrationEnd
maximumNumberOfTicketsForSale
isActive
isCompleted
hasLocation
eventDates {
id
startDateTime
endDateTime
}
eventLocations {
id
name
streetName
postalCode
city
}
ticketSpecifications {
id
name
price
includeVat
numberOfTicketsForSale
numberOfTicketsSold
isActive
}
}
}
}

Inspectors with subtype fragments

ticketInspectors returns the TicketInspector interface. Two concrete types exist: ExternalTicketInspector and BoardMemberTicketInspectorType. Use inline fragments if you need subtype-specific behavior (currently both expose the same shared interface fields, so the inline fragments mostly serve as type discriminators in the response).

query eventInspectors($id: UUID!) {
events(where: { id: { eq: $id } }, first: 1) {
nodes {
id
name
ticketInspectors {
__typename
id
name
email
phoneNumber
}
}
}
}

Cover image

coverImage is a BlobFile. Project metadata for cheap, request base64 only when downloading.

query eventCover($id: UUID!) {
events(where: { id: { eq: $id } }, first: 1) {
nodes {
id
name
coverImage {
id
fileName
fileExtension
url
}
}
}
}