a custom subscription
// Subscribe to incoming messages
receive: a.subscription()
// subscribes to the 'publish' mutation
.for(a.ref('publish'))
// subscription handler to set custom filters
.handler(a.handler.custom({entry: './receive.js'}))
// authorization rules as to who can subscribe to the data
.authorization(allow => [allow.publicApiKey()]),
Define a custom subscription to receive an event when a mutation is triggered