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
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
alright, I'll try using this example. https://github.com/ztellman/aleph/blob/master/examples/src/aleph/examples/websocket.clj
no public yada examples I guess?
I think there's one in edge
https://github.com/juxt/edge/blob/master/examples/main/src/edge/yada/graphql_ws.clj
Yes, that's it - it's a websocket that feeds graphql subscription notifications to apollo's graphql client
cool, thanks!
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
sorry about the state of the code - it was written before I integrated clj-kondo into my emacs!!
no worries ๐
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=>
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 appwebsockets 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).
you could try a simple aleph server, get that working, then integrate with your yada-based system
https://aleph.io/codox/aleph/aleph.http.html#var-websocket-connection
alrighty, thanks
something worked!
nice! ๐