untangled

NEW CHANNEL: #fulcro
tony.kay 2017-06-10T06:44:28.417749Z

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 https://github.com/awkay/untangled (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

tony.kay 2017-06-10T06:45:16.419598Z

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

tony.kay 2017-06-10T06:46:18.422258Z

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

tony.kay 2017-06-10T06:46:37.423230Z

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

tony.kay 2017-06-10T06:47:29.425053Z

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