Parse a Schema Definition Language document into a Lacinia input schema.
Parse a Schema Definition Language document into a Lacinia input schema.
(parse-schema schema-string attach)
Given a GraphQL schema string, parses it and returns a Lacinia EDN schema. Defers validation of the schema to the downstream schema validator.
attach
should be a map consisting of the following keys:
:resolvers
is expected to be a map of:
{:type-name {:field-name resolver-fn}}
:scalars
is expected to be a map of:
{:scalar-name {:parse parse-spec
:serialize serialize-spec}}
A scalar map may also include a :description.
The provided scalar maps are merged into the scalars parsed from the document.
:streamers
is expected to be a map of:
{:type-name {:subscription-field-name stream-fn}}
:documentation
is expected to be a map of:
{:type-name doc-str
:type-name/field-name doc-str
:type-name/field-name.arg-name doc-str}
Given a GraphQL schema string, parses it and returns a Lacinia EDN schema. Defers validation of the schema to the downstream schema validator. `attach` should be a map consisting of the following keys: `:resolvers` is expected to be a map of: {:type-name {:field-name resolver-fn}} `:scalars` is expected to be a map of: {:scalar-name {:parse parse-spec :serialize serialize-spec}} A scalar map may also include a :description. The provided scalar maps are merged into the scalars parsed from the document. `:streamers` is expected to be a map of: {:type-name {:subscription-field-name stream-fn}} `:documentation` is expected to be a map of: {:type-name doc-str :type-name/field-name doc-str :type-name/field-name.arg-name doc-str}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close