Creating a mailbox lets you listen for events with specific names and one type.
Steps
- Call
notificationMailboxCreate().
mutation {
notificationMailboxCreate(input:{
# Mailbox name
name: String,
eventFilter: {
# Array of event names to filter for
eventNames: String[],
# Event type to filter for
eventType: String,
# Application this mailbox is for
applicationId: String,
delivery:{
deliveryType:NotificationMailbox
}
},
# Customizable body of the notification message. You can include variables from the event object with {{var name}}.
notificationTemplate: String,
}) {
id
name
}
}
The response looks like this:
{
"data": {
"notificationMailboxCreate": {
"id": "0a51352e-2682-42e1-93a8-16ecd49f85f8",
"name": "Your mailbox"
}
}
}