stillsuit.lacinia.resolvers
Implementation functions for stillsuit resolvers.
enum-resolver
(enum-resolver {:stillsuit/keys [attribute lacinia-type], :as opts})
Resolver used to get an attribute value for a lacinia enum type. This uses the :stillsuit/enum-map map from the schema definition, which is attached to the app-context by (stillsuit/decorate).
get-graphql-value
(get-graphql-value entity graphql-field-name options)
Given a datomic entity and a field name from GraphQL, try to look up the field name in the entity by inspecting the entity, looking for a unique attribute, and using that as the namespace for the keyword.
graphql-field->datomic-attribute
(graphql-field->datomic-attribute entity graphql-field-name options)
Given a datomic entity and a field name from GraphQL, try to look up the field name in the entity by inspecting the entity, looking for a unique attribute, and using that as the namespace for the keyword. Return the keyword corresponding to the attribute in datomic.
ref-resolver
(ref-resolver {:stillsuit/keys [attribute lacinia-type], :as opts})
Resolver used to get a literal attribute value out of an entity, eg in :resolve [:stillsuit/attribute {:stillsuit/attribute :artist/_country}]