Fork me on GitHub
#yada
<
2020-03-26
>
borkdude13:03:52

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

malcolmsparks14:03:08

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

borkdude14:03:47

no public yada examples I guess?

dominicm14:03:27

I think there's one in edge

malcolmsparks14:03:34

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

borkdude14:03:55

cool, thanks!

malcolmsparks14:03:24

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

malcolmsparks14:03:49

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

borkdude14:03:10

no worries 😉

borkdude14:03:10

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=>

borkdude14:03:24

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

malcolmsparks14:03:58

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).

malcolmsparks14:03:11

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

borkdude14:03:30

alrighty, thanks

borkdude14:03:30

something worked!

malcolmsparks16:03:13

nice! 🙂