Liking cljdoc? Tell your friends :D
Clojure only.

com.fulcrologic.rad.database-adapters.sql.plugin


pathom-pluginclj

(pathom-plugin database-mapper)
(pathom-plugin database-mapper config)

A pathom plugin that adds the necessary SQL connections and databases to the pathom env for a given request. Requires a database-mapper, which is a (fn [pathom-env] {schema-name connection-pool}) for a given request.

You should also pass the general config if possible, which should have an ::sql/databases key. This allows the correct vendor adapter to be selected for each database.

The resulting pathom-env available to all resolvers will then have:

  • ::sql.plugin/connection-pools: The result of the database-mapper.

This plugin should run before (be listed after) most other plugins in the plugin chain since it adds connection details to the parsing env.

A pathom plugin that adds the necessary SQL connections and databases to the pathom env for
a given request. Requires a database-mapper, which is a
`(fn [pathom-env] {schema-name connection-pool})` for a given request.

You should also pass the general config if possible, which should have an ::sql/databases key. This allows the
correct vendor adapter to be selected for each database.

The resulting pathom-env available to all resolvers will then have:

- `::sql.plugin/connection-pools`: The result of the database-mapper.

This plugin should run before (be listed after) most other plugins in the plugin chain since
it adds connection details to the parsing env.
sourceraw docstring

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

× close