alumbra.pipeline.steps
run
(run opts state)Runs the given state through the pipeline. It has to be a map of:
:query: the GraphQL query string,:operation-name: the GraphQL operation to run (if multiple are given),:variables: a map of variable names and values,:context: a map describing the context of the operation (e.g. session information).
This returns an execution result consisting of the input state, plus:
:status: either:success,:exceptionor:error.:data: the execution result data (if available),:exception: a potentially thrown exception,:error: a keyword describing the kind of error encountered,:errors: a map describing the encountered errors.
opts has to be a map of alumbra.spec-compliant components:
:parser-fn:validator-fn:canonicalize-fn:executor-fn
run-ring-request
(run-ring-request opts request)Like run but uses the given Ring request to extract :query, :operation-name and :variables.
Additionally, opts may contain a :context-fn key that will be applied to the request to derive the :context key.
Note that the request’s :body has to be a map (i.e. already JSON-decoded).