This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
[Discuss]: document an example of how PubSubEngine or a GraphbackCrudService can be used to achieve async / event bound tasks #2119
Labels
This builds on #1896 but can be documented separately.
With the crud Event emission mechanism we've in place, once can achieve so many event based operations e.g
If we take the
Meter
business model from an IOT worldOne usecase will be to send a notification once:
On top of being able to subscribe to these changes via GraphQL subscriptions (on-call engineers would see these),
one would also like to perform other business related tasks e.g
This can be achieved now by subscribing to the PubSub engine passed as an example but it requires one to have the knowledge of Graphback internals e.g
topicName
for each operation and type,Code snippet:
It will be useful to document the default
topicName
and especially theevent structure
things.Optionally, we could provide a way to subscribe to these changes via the
service
.The text was updated successfully, but these errors were encountered: