Fork me on GitHub
#malli
<
2021-04-17
>
Leonid Korogodski02:04:48

(defn restart []
  (mount.core/stop)
  (mount.core/start))

ikitommi12:04:12

@lkorogodski in your example, there are both clojure specs (`:authorization)` and malli schemas (`:query)`. You should pick either one via :coercion option in the route data and use it in all the places. The error comes from spec-tools, so I believe you have coercion set to clojure.spec.

3
ikitommi12:04:51

there are malli examples under examples . Hope this helps you to the right direction

ikitommi12:04:49

@schmee sure, nothing built-in I guess, but you can add a custom decoder into the :map schema, reduce over the all map entries and remove nils.

ikitommi12:04:58

there are similar imps in malli.transform for stripping out extra keys and transforming keys.

👍 2
ikitommi13:04:21

looking at GraphQL fragments, would be relatively easy to support those in malli. But not sure if that would be a good idea. Maybe not.

eskos19:04:43

IIRC they're very close to Turing complete, so maybe not 🙂

eskos19:04:20

There's https://github.com/Vincit/venia which is data based so maybe have venia/Malli thingy instead? Would save you from implementing your own GraphQL parsing stuff as well.

ikitommi13:04:03

writing GraphQL<->Malli would be easier with that for sure.