(attach-custom-scalar m spec {:keys [_parse _serialize] :as sm})
Attaches a custom scalar to the schema. See https://lacinia.readthedocs.io/en/latest/custom-scalars.html
Attaches a custom scalar to the schema. See https://lacinia.readthedocs.io/en/latest/custom-scalars.html
(attach-field-resolver m field-spec resolver)
Adds a field resolver into the provided pre-compiled data structure
Adds a field resolver into the provided pre-compiled data structure
(attach-field-resolvers m & field-pairs)
Adds a series of field resolvers into the provided pre-compiled data structure
Adds a series of field resolvers into the provided pre-compiled data structure
(attach-middleware m middleware-fn)
Adds a middleware fn into the provided pre-compiled data structure
Adds a middleware fn into the provided pre-compiled data structure
(attach-mutation m mutation-spec results-spec resolver)
Adds a mutation resolver fn into the provided pre-compiled data structure
Adds a mutation resolver fn into the provided pre-compiled data structure
(attach-object m object-spec & {:keys [input?]})
Adds an object (not referred to by a query, mutation, or field resolver) into the provided pre-compiled data structure
Adds an object (not referred to by a query, mutation, or field resolver) into the provided pre-compiled data structure
(attach-query m query-spec results-spec resolver)
Adds a query resolver into the provided pre-compiled data structure
Adds a query resolver into the provided pre-compiled data structure
(attach-schema m schema)
Adds an external Lacinia schema into the provided pre-compiled data structure
Adds an external Lacinia schema into the provided pre-compiled data structure
(attach-type-alias m spec alias)
Attach an alias to a spec that's a type. All type instances of that spec name will be replaced with the alias. This can be used to avoid conflicts.
Attach an alias to a spec that's a type. All type instances of that spec name will be replaced with the alias. This can be used to avoid conflicts.
(build-middleware resolver middleware args)
Builds a fn which nests all the middleware and eventually the resolver
Builds a fn which nests all the middleware and eventually the resolver
(compile m)
(compile m opts)
Generates a Lacinia schema from pre-compiled data structure and compiles it.
Compile options:
:default-field-resolver
: Passed to Lacinia. A function that accepts a field name (as a keyword) and converts it into the default field resolver; see Lacinia src
Generates a Lacinia schema from pre-compiled data structure and compiles it. Compile options: :default-field-resolver : Passed to Lacinia. A function that accepts a field name (as a keyword) and converts it into the default field resolver; see Lacinia src
(create)
Creates an empty pre-compiled data structure for Leona
Creates an empty pre-compiled data structure for Leona
(error {key :key message :message :as error-map})
Creates an error result as recognised by Lacinia
Creates an error result as recognised by Lacinia
(execute m query)
(execute m query variables ctx)
Executes Lacinia commands; adds middleware into the context which is required by the resolver wrapper
Executes Lacinia commands; adds middleware into the context which is required by the resolver wrapper
(format-input m spec)
Format the input into a resolver
Format the input into a resolver
Format enum values in the input.
Format enum values in the input.
Format enum values in the output.
Format enum values in the output.
(format-result m spec)
Format the results of a resolver
Format the results of a resolver
(generate m)
Takes pre-compiled data structure and converts it into a Lacinia schema
Takes pre-compiled data structure and converts it into a Lacinia schema
(inject-custom-scalars m sms)
Add custom scalars to the Lacinia schema
Add custom scalars to the Lacinia schema
(inject-field-resolvers m frs)
Walks a set of objects, attempting to inject field resolvers into certain types
Walks a set of objects, attempting to inject field resolvers into certain types
(replace-input-objects m input-objects)
Given a map and map of input objects, replaces instances of input-object types with their transformed form
Given a map and map of input objects, replaces instances of input-object types with their transformed form
(transform-input-object-key k)
Adds a suffix 'input' to the provided keyword k
Adds a suffix 'input' to the provided keyword k
(transform-input-object-keys m)
Given the map m, transforms all its keys using the transform-input-object-key function
Given the map m, transforms all its keys using the transform-input-object-key function
(wrap-resolver id resolver-fn input-spec result-spec)
Used to wrap resolver fns provided by the user. This adds re-formatting in both directions and spec validation
Used to wrap resolver fns provided by the user. This adds re-formatting in both directions and spec validation
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close