Fork me on GitHub

Still on the whole I’m liking the move from lein to deps

Lennart Buit08:07:46

Oeh nice, the satisfies? problem I’ve stumbled over sometimes too. Clever, using early returns for values you know wont satisfy.


Excited to see a perf fix for satisfies?! Our codebase chokes on the latest because (selection/field-name (executor/selection ctx)) is no longer supported:

java.lang.IllegalArgumentException: No implementation of method: :field-name of protocol: #'com.walmartlabs.lacinia.selection/FieldDef found for class: com.walmartlabs.lacinia.parser.FieldSelection
Is this no longer supported, or did we stumble on a early bug?


I’m actually not sure why that worked before; how about (-> ctx selection/field selection/field-name) ?


> No implementation of method: :field of protocol: #'com.walmartlabs.lacinia.selection/FieldSelection found for class: clojure.lang.PersistentArrayMap Although this works: (-> ctx executor/selection selection/field selection/field-name)


Right, my answer was off the top of my head and wrong. So you get the selection from the context, and because you are in a field resolver, you know its a field selection and from there you can go to the field to extract the field name.


Makes sense, I updated it, tests passed 🎉 thanks for the work and the support!


That looks like a bug to me.


When needing to perform some sort of query over "my_schema.edn" (Lacinia schema), would you simply slurp it, or is there a fancier way?


(-> “foo.edn” io/resource slurp schema/compile) is my way

👌 2