Fork me on GitHub
#graphql
<
2018-01-10
>
hlship18:01:36

It's a lot of time and work to keep upgrading our apps to use the latest RCs, but I do find some rough edges doing so.

hlship18:01:20

Our apps are trickier than most, since we have to include a bunch of hacks related to old clients that expect behaviors that were present in Lacinia from long before it was publicly released. I hope and believe that apps that were built since the initial public release will have much less difficulty with upgrades ... feedback encouraged!

timgilbert20:01:19

I've been trying out the latest rc, seems real stable

timgilbert20:01:02

I have a question @hlship: I'm working on a library which takes in an uncompiled schema and then decorates it with some extra bits. It works great, but one thing I've run into is that the (attach-resolvers) function throws an error if some resolvers are referenced but not defined.

timgilbert20:01:02

Which seems like a good default, but I'd like to be able to tell the function "resolvers will be attached later, so don't throw errors until I call (compile) on the schema"

timgilbert20:01:28

Curious to get your thoughts. I can open a github issue too if that's preferable

timgilbert20:01:34

To make it a little more concrete, my public API right now looks like this:

(defn setup-schema []
  (-> {}
      inkvine/decorate-schema
      (util/attach-resolvers (inkvine/decorate-resolver-map resolver-map))
      (schema/compile)))

timgilbert20:01:37

... but I'd like it if the (decorate-resolver-map) bit could be abstracted away inside of (decorate-schema), so the library just attaches a bunch of object definitions, queries and resolvers to the schema without needing the whole schema to necessarily be complete when it's finished

hlship21:01:39

I'm just curious ... instead of decorating the schema with a keyword placeholder, then providing the map of keyword to function ... do you have the bits in place to just attach the function inside decorate-schema?

hlship21:01:03

Hey folks! rc-2 's just went up on Clojars.

timgilbert21:01:12

Hmm, I might be able to just bung the functions in there, yeah. Let me mess around with it a bit. I'll open a github issue with more detail otherwise