googled bidi to find the github page : found this as the first result : Bidi Meaning - (in South Asia) a type of cheap cigarette made of unprocessed tobacco wrapped in leaves. Was this the inspiration behind naming the library 😛
bi-directional 🙂
bidi came out of frustration with compojure not supporting url generation
I'm trying to use Sente with Yada. Its Aleph adapter returns {:body s}
where s
is Manifold's SplicedStream or {:status 403, :body "error msg"}
when there's some error (e.g. CSRF token mismatch).
As far as I can tell, Aleph serves this Manifold's stream as-is whereas Yada tries to serialize it (in my case to Transit since I've specified {:produces "application/transit+json"}
).
How do I avoid such serialization? How would you go about a case when all you can produce in a handler is some stream?
Digging deeper. The returned steam is an instance of IEventSource
, and calling to-body
on it calls render-seq
which depends on the selected representation.
And the example at edge/phonebook/graphql.clj
does an interesting thing. It also specifies :produces
but instead of returning a body, it loops in the executor on new messages until the stream is closed. I know you said that the phonebook examples are outdated but they are the only ones that have websockets example.