Lacinia seems to be the most popular Clojure GraphQL server library and, as such, we would like to support common use cases.
Particularly, we would like to be able to automatically instrument resolvers. The exact nature of the instrumentation is an open question.
- What is the interface for attaching specs to schemas?
- How are
fspec :fn specs defined?
- Automatic, based on a naming convention?
- Argument passed to the function that attaches specs?
- Should resolvers receive conformed or raw data?
- Should resolvers receive invalid data or should that automatically return an error?
- If the latter, how should the error be formatted?
- Should resolvers that return invalid data (whether by
:ret or :fn) throw immediately or cause errors to be attached to the response?
- If the latter, how should the error be formatted?
- Since most resolvers are anonymous, they cannot participate in clojure.spec's registry. How should we
instrument and unstrument anonymous functions?
- Should it be possible to
instrument or unstrument individual resolvers?
- Should it be possible to partially
instrument or unstrument (use any combination of :args, :ret, and :fn)?
- Should it be possible to partially
instrument or unstrument individual resolvers?
Lacinia seems to be the most popular Clojure GraphQL server library and, as such, we would like to support common use cases.
Particularly, we would like to be able to automatically instrument resolvers. The exact nature of the instrumentation is an open question.
fspec:fnspecs defined?:retor:fn) throw immediately or cause errors to be attached to the response?instrumentandunstrumentanonymous functions?instrumentorunstrumentindividual resolvers?instrumentorunstrument(use any combination of:args,:ret, and:fn)?instrumentorunstrumentindividual resolvers?