Fork me on GitHub
#graphql
<
2023-01-24
>
Zed00:01:11

In the revised documentation there's a broken reference in Field Resolvers/Examples/Formatting a Date to "resolver factory", since the section about the resolver factory functionality of attach-resolvers is gone. My thought is that instead of that reference you could put an example of constructing a resolver function, such as:

(fn [k fmt]
  (fn [context args resolved-value]
    (->> resolved-value
         k
         (format fmt))))

hlship18:01:00

Ah, thanks for catching this. I'll put something in place. resolver factories go hand-in-hand with attach-resolvers and are a poor replacement for ordinary functions (and high ordered functions) with inject-resolvers.

hlship18:01:14

I've implemented your suggestion.