Liking cljdoc? Tell your friends :D

com.fulcrologic.rad.pathom

Plugins and a default generated parser for working with RAD applications. You may use the source of this namespace as reference for making your own custom parser, or simply start with the new-parser function.

Plugins and a default generated parser for working with RAD applications. You may use the source of this namespace
as reference for making your own custom parser, or simply start with the `new-parser` function.
raw docstring

elide-reader-errorsclj

(elide-reader-errors input)
source

log-request!clj

(log-request! {:keys [env tx] :as req})
source

log-response!clj

(log-response! {:keys [config] :as env} response)
source

new-parserclj

(new-parser config extra-plugins resolvers)

Create a new pathom parser. config is a map containing a ::config key with parameters that affect the parser. extra-plugins is a sequence of pathom plugins to add to the parser. The plugins will typically need to include plugins from any storage adapters that are being used, such as the datomic/pathom-plugin. resolvers is a vector of all of the resolvers to register with the parser, which can be a nested collection.

Supported config options under the ::config key:

  • :trace? true Enable the return of pathom performance trace data (development only, high overhead)
  • :log-requests? boolean Enable logging of incoming queries/mutations.
  • :log-responses? boolean Enable logging of parser results.
Create a new pathom parser. `config` is a map containing a ::config key with parameters
that affect the parser. `extra-plugins` is a sequence of pathom plugins to add to the parser. The
plugins will typically need to include plugins from any storage adapters that are being used,
such as the `datomic/pathom-plugin`.
`resolvers` is a vector of all of the resolvers to register with the parser, which can be a nested collection.

Supported config options under the ::config key:

- `:trace? true` Enable the return of pathom performance trace data (development only, high overhead)
- `:log-requests? boolean` Enable logging of incoming queries/mutations.
- `:log-responses? boolean` Enable logging of parser results.
sourceraw docstring

parser-argsclj

(parser-args {:com.fulcrologic.rad.pathom/keys [trace? log-requests?
                                                log-responses?]
              :as config}
             plugins
             resolvers)
source

post-process-parser-plugin-with-envclj

(post-process-parser-plugin-with-env f)

Helper to create a plugin to work on the parser output. f will run once with the parser final result.

Helper to create a plugin to work on the parser output. `f` will run once with the parser final result.
sourceraw docstring

preprocess-parser-pluginclj

(preprocess-parser-plugin f)

Helper to create a plugin that can view/modify the env/tx of a top-level request.

f - (fn [{:keys [env tx]}] {:env new-env :tx new-tx})

If the function returns no env or tx, then the parser will not be called (aborts the parse)

Helper to create a plugin that can view/modify the env/tx of a top-level request.

f - (fn [{:keys [env tx]}] {:env new-env :tx new-tx})

If the function returns no env or tx, then the parser will not be called (aborts the parse)
sourceraw docstring

process-errorclj

(process-error env err)

If there were any exceptions in the parser that cause complete failure we respond with a well-known message that the client can handle.

If there were any exceptions in the parser that cause complete failure we
respond with a well-known message that the client can handle.
sourceraw docstring

query-params-to-env-pluginclj

Adds top-level load params to env, so nested parsing layers can see them.

Adds top-level load params to env, so nested parsing layers can see them.
sourceraw docstring

remove-omissionsclj

(remove-omissions config tx)

Replaces black-listed keys from tx with ::omitted, meant for logging tx's without logging sensitive details like passwords.

Replaces black-listed keys from tx with ::omitted, meant for logging tx's
without logging sensitive details like passwords.
sourceraw docstring

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

× close