channels-api icon indicating copy to clipboard operation
channels-api copied to clipboard

RFE: Subscription to multiple actions at once

Open Herst opened this issue 8 years ago • 3 comments

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"]
    }
  }
}

Herst avatar Jul 07 '17 14:07 Herst

I like this idea. How would you handle when subscriptions that have different requirements? IE update all resources vs update an individual?

linuxlewis avatar Jul 07 '17 18:07 linuxlewis

Of course not all combinations make sense, e.g. individual list, either return an error or silently ignore.

BTW, did you see #22?

Herst avatar Jul 09 '17 11:07 Herst

I would rather have an error for an invalid combination of subscriptions. We should consider the operation either all or nothing

linuxlewis avatar Jul 11 '17 14:07 linuxlewis