Fork me on GitHub
#graphql
<
2018-05-07
>
Logan Powell15:05:34

đź‘‹ Hi everyone! I'm very new to clj(s) (coming from JavaScript) and looking into doing a REST wrap with graphql. I know it will "depend" on my specific circumstance, but I'm considering either A) using js/interop with the latest Apollo-Server (includes support for Schema-stitching, which I might need in the not too distant future) or B) Lacinia+Pedestal. What might be the criteria for choosing between them I should keep in mind?

Logan Powell16:05:44

PS: I'm loving Clojure. Working with it (compared to js and its ecosystem) is the first time I've ever felt I'm in sane company.

prosper 12
mattly22:05:16

after I’ve tagged a map with lacinia.schema/tag-with-type is there a way to keep the tag if I need to assoc/update/dissoc that map later on in the processing chain?

hlship22:05:16

The API for that isn't public, currently.

hlship22:05:40

That's why the docs say "do it last". Also because if it isn't an IMeta, tag-with-type will return a wrapper object.

mattly22:05:45

yeah I might just have to use class tags instead

mattly22:05:00

“doing it last” in this case really isn’t feasible

hlship22:05:39

I shouldda used a Monad 🙂

mattly22:05:20

I suppose I could do some tree-walking in my final stage of the processing

mattly22:05:16

but I suspect using classes with defrecord instead will be easier

mattly23:05:04

classes didn’t work either

mattly23:05:12

fortunately tree-walking wasn’t as hard as I thought

mattly23:05:12

also yay for consistent use of enums/type names in unions

hlship23:05:52

You mean, that everything is converted to keywords internally?

mattly23:05:34

but also, for my clients, on every union type I expose a type field that is a union of all possible types for the union

mattly23:05:57

so that information is already there and consistent with what lacinia wants from the resolver

hlship23:05:13

Oh that helps. There's also typename.

mattly23:05:24

…yeah