Liking cljdoc? Tell your friends :D

com.wsscode.pathom3.connect.built-in.plugins


attribute-errors-pluginclj/sdeprecated

(attribute-errors-plugin)

DEPRECATED: attribute errors are now built-in, you can just remove it from your setup.

This plugin makes attributes errors visible in the data.

DEPRECATED: attribute errors are now built-in, you can just remove it
from your setup.

This plugin makes attributes errors visible in the data.
sourceraw docstring

dev-linterclj/s

(dev-linter)

This plugin adds linting features to help developers find sources of issues while Pathom runs its system.

Checks done:

  • Verify if all the output that comes out of the resolver is declared in the resolver output. This means the user missed some attribute declaration in the resolver output and that may cause inconsistent behavior on planning/running.
This plugin adds linting features to help developers find sources of issues while
Pathom runs its system.

Checks done:

- Verify if all the output that comes out of the resolver is declared in the resolver
  output. This means the user missed some attribute declaration in the resolver output
  and that may cause inconsistent behavior on planning/running.
sourceraw docstring

env-wrap-pluginclj/s

(env-wrap-plugin env-modifier)

Plugin to help extend the environment with something dynamic. This will run once around the whole request.

(p.plugin/register env (pbip/env-modify-plugin #(assoc % :data "bar")))
Plugin to help extend the environment with something dynamic. This will run once
around the whole request.

    (p.plugin/register env (pbip/env-modify-plugin #(assoc % :data "bar")))
sourceraw docstring

filtered-sequence-items-pluginclj/s

(filtered-sequence-items-plugin)
(filtered-sequence-items-plugin
  {:com.wsscode.pathom3.connect.built-in.plugins/keys [apply-everywhere?]})

By default, in Pathom strict mode, when an error occurs with one item in a sequence that will stop the process completly. This plugin provides a way to add some tolerance there. The way it does it is by filtering out of the output sequence any items that are unable to process fully.

In is default form, this plugin will only apply to cases where the use sets the meta ::pbip/remove-error-items in the query join, eg:

(p.eql/process
  (p.plugin/register env (pbip/filtered-sequence-items-plugin))
  [^::pbip/remove-error-items {:some-join [:x :y]}])

Now the items that can't conform from inside :some-join will get filtered out.

You can also make this applies everywhere by starting the plugin with the apply everywhere configuration:

(p.eql/process
  (p.plugin/register env (pbip/filtered-sequence-items-plugin {::pbip/apply-everywhere? true}))
  [^::pbip/remove-error-items {:some-join [:x :y]}])
By default, in Pathom strict mode, when an error occurs with one item in a sequence
that will stop the process completly. This plugin provides a way to add some tolerance
there. The way it does it is by filtering out of the output sequence any items that
are unable to process fully.

In is default form, this plugin will only apply to cases where the use sets the meta
`::pbip/remove-error-items` in the query join, eg:

    (p.eql/process
      (p.plugin/register env (pbip/filtered-sequence-items-plugin))
      [^::pbip/remove-error-items {:some-join [:x :y]}])

Now the items that can't conform from inside :some-join will get filtered out.

You can also make this applies everywhere by starting the plugin with the `apply
everywhere` configuration:

    (p.eql/process
      (p.plugin/register env (pbip/filtered-sequence-items-plugin {::pbip/apply-everywhere? true}))
      [^::pbip/remove-error-items {:some-join [:x :y]}])
sourceraw docstring

mutation-resolve-paramsclj/s

Remove the run stats from the result meta. Use this in production to avoid sending the stats. This is important for performance and security.

TODO: error story is not complete, still up to decide what to do when params can't get fulfilled.

Remove the run stats from the result meta. Use this in production to avoid sending
the stats. This is important for performance and security.

TODO: error story is not complete, still up to decide what to do when params can't
get fulfilled.
sourceraw docstring

placeholder-data-paramsclj/s

(placeholder-data-params)

This plugin will make placeholder params change data from the entity they point to. This behavior used to happen by default in the past, but it's now provided in the form of this plugin.

(p.plugin/register env (pbip/placeholder-data-params))

Then you can do:

(p.eql/process env [{'(:>/foo {:some-data "value"}) [:some-data]}]
=> {:some-data "value"}
This plugin will make placeholder params change data from the entity they point to.
This behavior used to happen by default in the past, but it's now provided in the form
of this plugin.

    (p.plugin/register env (pbip/placeholder-data-params))

Then you can do:

    (p.eql/process env [{'(:>/foo {:some-data "value"}) [:some-data]}]
    => {:some-data "value"}
sourceraw docstring

resolver-weight-trackerclj/s

(resolver-weight-tracker)

Starts an atom to track the weight of a resolver. The weight is calculated by measuring the time a resolver takes to run. The time is added to last known time (or 1 in case of no previous data) and divided by two to get the new weight.

You should use this plugin to enable weight sorting.

Starts an atom to track the weight of a resolver. The weight is calculated by measuring
the time a resolver takes to run. The time is added to last known time (or 1 in case of
no previous data) and divided by two to get the new weight.

You should use this plugin to enable weight sorting.
sourceraw docstring

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

× close