Set up an event
End-to-end: take a freshly-created draft event and configure its name, description, registration deadline, location, and dates. After this you'll have a draft event ready for ticket setup (Configure tickets) and inspector assignment (Assign inspectors).
Where do new events come from? This API exposes mutations to configure events but not to create them — events are created in the Unioo platform. Once a draft exists, find its ID via the events query, then walk through this workflow.
All steps require a JWT — get one from the homepage first.
1. Find your draft event
Filter events to drafts (not published, not completed). Sort by creation date so the newest one is on top.
query findDraft {
events(
where: { and: [{ isActive: { eq: false } }, { isCompleted: { eq: false } }] }
order: [{ createdDate: DESC }]
first: 10
) {
nodes {
id
name
}
}
}
Save the id of the event you want to configure — you'll plug it into every following step.
2. Set the name
mutation editName($input: EditNameInput!) {
editName(input: $input) {
success
}
}
3. Set the description
mutation addOrEditDescription($input: AddOrEditDescriptionInput!) {
addOrEditDescription(input: $input) {
success
}
}
4. Set the registration deadline
mutation addOrEditRegistrationEnd($input: AddOrEditRegistrationEndInput!) {
addOrEditRegistrationEnd(input: $input) {
success
}
}
5. Set a location
If the event is at a physical venue, set address fields:
mutation setVenue($input: AddOrEditEventLocationInput!) {
addOrEditEventLocation(input: $input) {
eventLocation {
id
name
}
}
}
If the event is online or location-TBD, mark it as having no location instead:
mutation noVenue($input: AddOrEditEventLocationInput!) {
addOrEditEventLocation(input: $input) {
eventLocation { id }
}
}
6. Add dates
A single-evening event needs one date. Multi-day events need one per day. Add dates before ticket specifications — when you later add a spec, every existing date is automatically attached. If you reverse the order, you'll need to re-attach manually.
mutation addEventDate($input: AddEventDateInput!) {
addEventDate(input: $input) {
eventDate {
id
startDateTime
endDateTime
}
}
}
Repeat for each additional date.
7. Verify
Pull the event back to confirm everything is configured.
query verifyEvent($id: UUID!) {
events(where: { id: { eq: $id } }, first: 1) {
nodes {
id
name
description
registrationEnd
hasLocation
eventLocations { id name streetName postalCode city }
eventDates { id startDateTime endDateTime }
}
}
}
Next: configure ticket specifications — see Configure tickets.