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.
(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.
(parser-args {:com.fulcrologic.rad.pathom/keys [trace? log-requests?
log-responses?]
:as config}
plugins
resolvers)(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.
(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)(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.
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.
(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |