Liking cljdoc? Tell your friends :D

stillsuit.core

Main public API for stillsuit.

For more details, see the user manual.

Note that this namespace constitutes the entirety of the public API; all the other namespaces in stillsuit can be considered to be implementation details and may change over time.

Main public API for stillsuit.

For more details, see the [user manual](http://docs.workframe.com/stillsuit/current/manual/).

Note that this namespace constitutes the entirety of the public API; all the other
namespaces in stillsuit can be considered to be implementation details and may change
over time.
raw docstring

connectionclj

(connection app-context)

Given a stillsuit-decorated app context, return the datomic connection object that was associated with the context at the time (stillsuit/decorate) was called.

Parameters:

  • app-context: the lacinia application context (first argument to a resolver function)

For more information, see the user manual.

Given a stillsuit-decorated app context, return the datomic connection object that was associated with the
context at the time `(stillsuit/decorate)` was called.

Parameters:

- `app-context`: the lacinia application context (first argument to a resolver function)

For more information, see [the user manual](http://docs.workframe.com/stillsuit/current/manual/#_stillsuit_enums).
sourceraw docstring

datomic-enumclj

(datomic-enum app-context lacinia-type lacinia-enum-keyword)

Given a stillsuit-decorated app context and a keyword representing a lacinia enum which has been described in the stillsuit config, return the keyword corresponding to the datomic value for that keyword.

Parameters:

  • app-context: the lacinia application context (first argument to a resolver function)
  • lacinia-type: the keyword corresponding to a lacinia :enum definition
  • lacinia-enum-keyword: a keyword representing the value we're trying to convert to its datomic equivalent

For more information, see the user manual.

Given a stillsuit-decorated app context and a keyword representing a lacinia enum which has
been described in the stillsuit config, return the keyword corresponding to the datomic value
for that keyword.

Parameters:

- `app-context`: the lacinia application context (first argument to a resolver function)
- `lacinia-type`: the keyword corresponding to a lacinia `:enum` definition
- `lacinia-enum-keyword`: a keyword representing the value we're trying to convert to
  its datomic equivalent

For more information, see [the user manual](http://docs.workframe.com/stillsuit/current/manual/#_stillsuit_enums).
sourceraw docstring

dbclj

(db app-context)

Given a stillsuit-decorated app context, get the most recent datomic db value from its datomic connection.

Parameters:

  • app-context: the lacinia application context (first argument to a resolver function)

For more information, see the user manual.

Given a stillsuit-decorated app context, get the most recent datomic db value from its datomic connection.

Parameters:

- `app-context`: the lacinia application context (first argument to a resolver function)

For more information, see [the user manual](http://docs.workframe.com/stillsuit/current/manual/#_stillsuit_enums).
sourceraw docstring

decorateclj

(decorate {:stillsuit/keys [schema config resolvers transformers context
                            connection entity-filters]})

Main interface to stillsuit. Accepts a map containing various parameters as input; returns a map with an app context and a schema. The map can be passed to execute in order to invoke lacinia with its configuration.

The single argument to (decorate) should be a map with the following keys:

  • :stillsuit/schema: a normal lacinia schema definition.
  • :stillsuit/connection: a datomic connection object.
  • :stillsuit/resolvers: a map of keywords to resolver function objects, identical to the map you'd pass to (lacinia.util/attach-resolvers).
  • :stillsuit/config (optional): a map of configuration options for stillsuit.
  • :stillsuit/context (optional): a map containing any custom information your resolvers need, identical to the context argument you'd pass to (lacinia/execute).
  • :stillsuit/transformers (optional): a map of keywords to scalar transformer function objects, identical to the map you'd pass to (lacinia.util/attach-scalar-transformers).
  • :stillsuit/entity-filters (optional): a map of keywords to entity filter functions, which are used to filter the results of :stillsuit/ref resolvers.

The return value of this function is a map with two keys:

  • :stillsuit/schema: the compiled, transformed schema definition
  • :stillsuit/app-context: an application context object

These two data structures can be passed to (lacinia/execute) directly, or there is a simple wrapper function execute that will invoke lacinia for you.

For more information, see the user manual.

Main interface to stillsuit. Accepts a map containing various parameters as input; returns
a map with an app context and a schema. The map can be passed to [[execute]] in order to
invoke lacinia with its configuration.

The single argument to `(decorate)` should be a map with the following keys:

- `:stillsuit/schema`: a normal
  [lacinia schema definition](http://lacinia.readthedocs.io/en/latest/tutorial/init-schema.html#schema-edn-file).
- `:stillsuit/connection`: a datomic [connection object]().
- `:stillsuit/resolvers`: a map of keywords to resolver function objects, identical to the
  map you'd pass to
  [`(lacinia.util/attach-resolvers)`](http://lacinia.readthedocs.io/en/latest/resolve/attach.html).
- `:stillsuit/config` (optional): a map of
  [configuration options](http://docs.workframe.com/stillsuit/current/manual/#_compiling_a_schema)
  for stillsuit.
- `:stillsuit/context` (optional): a map containing any custom information your resolvers need,
  identical to the `context` argument you'd pass to `(lacinia/execute)`.
- `:stillsuit/transformers` (optional): a map of keywords to scalar transformer function objects,
  identical to the map you'd pass to
  [`(lacinia.util/attach-scalar-transformers)`](http://lacinia.readthedocs.io/en/latest/custom-scalars.html#attaching-scalar-transformers).
- `:stillsuit/entity-filters` (optional): a map of keywords to entity filter functions, which are
  used to filter the results of :stillsuit/ref resolvers.

The return value of this function is a map with two keys:

- `:stillsuit/schema`: the compiled, transformed schema definition
- `:stillsuit/app-context`: an application context object

These two data structures can be passed to `(lacinia/execute)` directly, or there is a
simple wrapper function [[execute]] that will invoke lacinia for you.

For more information, see [the user manual](http://docs.workframe.com/stillsuit/current/manual/).
sourceraw docstring

executeclj

(execute stillsuit-result query)
(execute stillsuit-result query variables)

Convenience function to take the result of decorate and execute a query against it. The query and variables parameters are the same ones that would be passed to (lacinia.core/execute).

For more information, see the user manual.

Convenience function to take the result of [[decorate]] and execute a query against it.
The `query` and `variables` parameters are the same ones that would be passed to
`(lacinia.core/execute)`.

For more information, see [the user manual](http://docs.workframe.com/stillsuit/current/manual/#__code_stillsuit_execute_code).
sourceraw docstring

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

× close