Fork me on GitHub
#yada
<
2017-08-22
>
cjhowe02:08:34

how would you use your own transit writer in yada? i need to use om.transit/writer instead https://github.com/juxt/yada/blob/432d1b25f83a4af5d94d1108f37ee253a2a74bce/ext/transit/src/yada/transit.clj#L12

dominicm08:08:43

@cjhowe copy & paste the multimethods in that file 🙂

malcolmsparks08:08:21

Exactly. Multimethods ftw

cjhowe12:08:44

oh wow, the dispatch table is a map. thanks!

dominicm15:08:40

just to make sure I'm not missing anything: the only way to really pass additional arguments to a multimethod is a dynamic var?

malcolmsparks15:08:18

Most multimethods take the request context.

malcolmsparks15:08:44

Which defmulti if any are you referring to

cjhowe15:08:34

yada.body/render-map, yada.body/render-seq, and yada.request-body/parse-stream

cjhowe15:08:01

i actually think a dynamic var could be a fine solution

mccraigmccraig15:08:53

dynamic vars are awful in async code

dominicm15:08:12

taking the resource/ctx makes most sense I think, yeah

cjhowe15:08:28

in this case, it's just a map not a resource, but i could see how it could complicate async code