Fork me on GitHub

It occurred to me that it would be relatively easy to make some query/mutation helpers for the server-side so you could reduce the amount of parser logic there. I’ve added untangled-parser to the untangled.server namespace in the new combo lib (develop branch), along with three macros for adding handlers for queries and mutations. I have not had time to play with them yet, but you might find the extensions interesting. See defquery-entity, defquery-root, and defmutation (for the server). It is also on clojars


basically, you use (untangled-parser) to make a pre-written Om parser, and use that on the incoming EDN expressions.


(untangled.easy-server/make-untangled-server :parser (untangled.server/untangled-parser))


then all of your mutations and queries can be defined with the above-mentioned macros.


Recursive parsing is also possible, since you have the env (which in turn has the parser)