yada

borkdude 2020-03-26T13:40:52.000500Z

I might consider migration from SSE to websockets in our yada app. Any examples? Last time I checked it wasn't very easy like SSE

malcolmsparks 2020-03-26T14:02:08.002100Z

It's easy enough, I've done it. It's more like you leave yada altogether. It's one function call to aleph as I remember

borkdude 2020-03-26T14:06:36.002400Z

alright, I'll try using this example. https://github.com/ztellman/aleph/blob/master/examples/src/aleph/examples/websocket.clj

borkdude 2020-03-26T14:06:47.002800Z

no public yada examples I guess?

dominicm 2020-03-26T14:07:27.003200Z

I think there's one in edge

malcolmsparks 2020-03-26T14:12:34.004700Z

Yes, that's it - it's a websocket that feeds graphql subscription notifications to apollo's graphql client

borkdude 2020-03-26T14:12:55.005300Z

cool, thanks!

malcolmsparks 2020-03-26T14:13:24.005900Z

We did get it working and it was quite nice that we didn't have to build very much to do it - manifold provides much of the additional functionality that lacinia needs

malcolmsparks 2020-03-26T14:13:49.006300Z

sorry about the state of the code - it was written before I integrated clj-kondo into my emacs!!

borkdude 2020-03-26T14:14:10.006700Z

no worries ๐Ÿ˜‰

borkdude 2020-03-26T14:29:10.007500Z

trying to run the example:

$ ../../bin/rebel -A:dev
[Edge] Starting development environment, please waitโ€ฆ
[Rebel readline] Type :repl/help for online help info
[Edge] Loading Clojure code, please wait...
[Edge] Failed to require dev. Falling back to `user`.
[Edge] Make sure to supply `-A:dev` when running `../bin/rebel`.
user=>

borkdude 2020-03-26T14:30:24.008200Z

the thing I'm trying to find out is if I have to do anything special to make websockets work with yada. right now I'm getting:

ERR_DISALLOWED_URL_SCHEME
in my own app

malcolmsparks 2020-03-26T14:31:58.008900Z

websockets are orthogonal to yada - it's a different protocol, piggybacked on an HTTP connection (which is useful, because you can authenticate first before upgrading the protocol).

malcolmsparks 2020-03-26T14:32:11.009400Z

you could try a simple aleph server, get that working, then integrate with your yada-based system

borkdude 2020-03-26T14:36:30.009700Z

alrighty, thanks

borkdude 2020-03-26T14:54:30.009900Z

something worked!

malcolmsparks 2020-03-26T16:35:13.010300Z

nice! ๐Ÿ™‚