graphql-gun icon indicating copy to clipboard operation
graphql-gun copied to clipboard

Configurable subscription interface (RxJS, co, CSP, callback, etc...)

Open brysgo opened this issue 8 years ago • 4 comments

I started with an iterator over promises and it turned out to be a bit much, so I switched to a promise factory like you get with co.wrap. I like this solution, but there are so many subscription options it would be nice to be able to drop an arbitrary one in.

brysgo avatar Mar 28 '17 11:03 brysgo

Have a look at water-fun

ES2017 Observable

  • rx
  • zen
  • xstream

CSP

  • CSP channels

kristianmandrup avatar Mar 28 '17 17:03 kristianmandrup

Thanks, I'm probably going to have a configurable observable interface, and maybe a separate library that exports configurations for different technologies.

brysgo avatar Mar 28 '17 20:03 brysgo

The way redux approaches this is having a terribly simple event-based subscription (store.subscribe(cb)) that can trivially be adapted to any observer library, etc.

devinivy avatar May 17 '17 04:05 devinivy

In that case, though very poorly documented, the subscription interface currently in place has a bunch of different interfaces that would be trivial to hook up to an observer library.

brysgo avatar May 17 '17 13:05 brysgo