Liking cljdoc? Tell your friends :D

com.wsscode.pathom3.interface.eql


boundary-interfaceclj/s

(boundary-interface env)

Returns a function that wraps the environment. When exposing Pathom to some external system, this is the recommended way to do it. The format here makes your API compatible with Pathom Foreign process, which allows the integration of distributed environments.

When calling the remote interface the user can send a query or a map containing the query and the initial entity data. This map is open and you can use as a way to extend the API.

Boundary interface:

([env-ext request]) ([request])

Request is one of:

  1. An EQL request
  2. A map, supported keys: :pathom/eql :pathom/ast :pathom/entity

Env ext can be either a map to merge in the original env, or a function that transforms the env.

Returns a function that wraps the environment. When exposing Pathom to some external
system, this is the recommended way to do it. The format here makes your API compatible
with Pathom Foreign process, which allows the integration of distributed environments.

When calling the remote interface the user can send a query or a map containing the
query and the initial entity data. This map is open and you can use as a way to extend
the API.

Boundary interface:

([env-ext request])
([request])

Request is one of:

1. An EQL request
2. A map, supported keys:
    :pathom/eql
    :pathom/ast
    :pathom/entity

Env ext can be either a map to merge in the original env, or a function that transforms
the env.
raw docstring

extend-envclj/s

(extend-env source-env env-extension)

normalize-inputclj/s

(normalize-input input)

Normalize a remote interface input. In case of vector it makes a map. Otherwise returns as is.

IMPORTANT: :pathom/tx is deprecated and its going to be dropped, if you are using it please replace it with :pathom/eql to avoid breakages in the future.

Normalize a remote interface input. In case of vector it makes a map. Otherwise
returns as is.

IMPORTANT: :pathom/tx is deprecated and its going to be dropped, if you are using it please
replace it with :pathom/eql to avoid breakages in the future.
raw docstring

processclj/s

(process env tx)
(process env entity tx)

Evaluate EQL expression.

This interface allows you to request a specific data shape to Pathom and get the response as a map with all data combined.

This is efficient for large queries, given Pathom can make a plan considering the whole request at once (different from Smart Map, which always plans for one attribute at a time).

At minimum you need to build an index to use this.

(p.eql/process (pci/register some-resolvers)
  [:eql :request])

By default, processing will start with a blank entity tree. You can override this by sending an entity tree as the second argument in the 3-arity version of this fn:

(p.eql/process (pci/register some-resolvers)
  {:eql "initial data"}
  [:eql :request])

For more options around processing check the docs on the connect runner.

Evaluate EQL expression.

This interface allows you to request a specific data shape to Pathom and get
the response as a map with all data combined.

This is efficient for large queries, given Pathom can make a plan considering
the whole request at once (different from Smart Map, which always plans for one
attribute at a time).

At minimum you need to build an index to use this.

    (p.eql/process (pci/register some-resolvers)
      [:eql :request])

By default, processing will start with a blank entity tree. You can override this by
sending an entity tree as the second argument in the 3-arity version of this fn:

    (p.eql/process (pci/register some-resolvers)
      {:eql "initial data"}
      [:eql :request])

For more options around processing check the docs on the connect runner.
raw docstring

process-astclj/s

(process-ast env ast)

process-ast*clj/s

(process-ast* env ast)

satisfyclj/s

(satisfy env entity tx)

Works like process, but none of the original entity data is filtered out.

Works like process, but none of the original entity data is filtered out.
raw docstring

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

× close