Liking cljdoc? Tell your friends :D
Clojure only.

stillsuit.lacinia.enums

Implementation functions related to translating enum values between lacinia and stillsuit.

Implementation functions related to translating enum values between lacinia and stillsuit.
raw docstring

make-enum-mapclj

(make-enum-map config schema)

Look through a decorated lacinia schema, scanning its enum values. For each enum description, check for a :stillsuit/datomic-value key, representing what value the enum should have in the datomic database.

Return a map with an entry for each enum which contains such a key. Inside of this map will be two entries: :stillsuit/datomic-to-lacinia maps from datomic names to their lacinia enum counterparts, and :stillsuit/lacinia-to-datomic goes the other way. These maps are stored in the app context and used in stillsuit enum resolvers and the (stillsuit/datomic-enum) function.

Look through a decorated lacinia schema, scanning its enum values. For each enum description,
check for a `:stillsuit/datomic-value` key, representing what value the enum should have in the
datomic database.

Return a map with an entry for each enum which contains such a key. Inside of this map will be
two entries: `:stillsuit/datomic-to-lacinia` maps from datomic names to their lacinia enum
counterparts, and `:stillsuit/lacinia-to-datomic` goes the other way. These maps are stored
in the app context and used in stillsuit enum resolvers and the `(stillsuit/datomic-enum)` function.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close