channels-api
channels-api copied to clipboard
RFE: Subscription to multiple actions at once
Might look like the following:
// get an event when any question is created, updated or deleted
var msg = {
stream: "questions",
payload: {
action: "subscribe",
data: {
action: ["create", "update", "delete"]
}
}
}
I like this idea. How would you handle when subscriptions that have different requirements? IE update all resources vs update an individual?
Of course not all combinations make sense, e.g. individual list, either return an error or silently ignore.
BTW, did you see #22?
I would rather have an error for an invalid combination of subscriptions. We should consider the operation either all or nothing