duct

2019-05-21T10:58:32.055600Z

question about ataraxy metadata syntax for middlewares: the order of middlewares are not guaranteed because they are hashmap keys produced by clojure reader. How do I denote the exact order? any alternative syntax?

2019-05-23T15:31:21.056500Z

I think it would be convenient to compose middlewares with config like this:

{:duct.router/ataraxy
  {:routes {[:get "/path"] ^:wrap-c [:some-handler]}
   :middleware
   {:wrap-a #ig/ref ...
    :wrap-b #ig/ref ...
    :wrap-c [:wrap-a :wrap-b]}}}

2019-05-21T23:41:39.056100Z

Currently I think the only way to guarantee the order is to compose the two middleware functions.

2019-05-21T23:42:05.056300Z

I’ve been considering a way of determining the order of metadata through dependencies that might help in future.