How to have smaller pubsub payloads?
So, AFAIK when using the built-in pubsub feature of Ash, the payload will always be the action returned data with some other stuff.
That payload sometimes is very big, especially if it is a big resource and there is a bunch of processes subscribed to that event. This is OK if you need the full resource, but sometimes you don't need the whole thing.
For example, let's say I have a front page that lists properties and I subscribe to an event that will notify me when a new property is added. In this scenario, I don't want to get the full property and just add to the list, what I want is just add a button to the page saying "there are new properties available, click here to update your list".
In that case, I just need an event that will tell me that a new property was added, the property content itself is meaningless since the user needs to click on the button to refresh the page and get a new list with the new property meaning that my payload can be empty.
Would be possible to set the payload of a pubsub event using Ash?
That payload sometimes is very big, especially if it is a big resource and there is a bunch of processes subscribed to that event. This is OK if you need the full resource, but sometimes you don't need the whole thing.
For example, let's say I have a front page that lists properties and I subscribe to an event that will notify me when a new property is added. In this scenario, I don't want to get the full property and just add to the list, what I want is just add a button to the page saying "there are new properties available, click here to update your list".
In that case, I just need an event that will tell me that a new property was added, the property content itself is meaningless since the user needs to click on the button to refresh the page and get a new list with the new property meaning that my payload can be empty.
Would be possible to set the payload of a pubsub event using Ash?
