Liking cljdoc? Tell your friends :D

com.wsscode.pathom3.interface.eql


boundary-envclj/s

(boundary-env env request)
source

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 :pathom/include-stats? :pathom/lenient-mode?

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
    :pathom/include-stats?
    :pathom/lenient-mode?

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

extend-envclj/s

(extend-env source-env env-extension)
source

normalize-inputclj/s

(normalize-input env 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.
sourceraw 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.
sourceraw docstring

process-astclj/s

(process-ast env ast)
source

process-ast*clj/s

(process-ast* env ast)
source

process-oneclj/s

(process-one env attr)
(process-one env entity attr)

Similar to process, but returns a single value instead of a map.

This is a convenience method to read a single attribute.

Simplest usage:

(p.eql/process-one env :foo)

Same as process, you can send initial data:

(p.eql/process-one env {:data "here"} :foo)

You can also use joins and param expressions:

(p.eql/process-one env {:join [:sub-query]})
(p.eql/process-one env '(:param {:expr "sion"}))

If the value returned supports meta, it will have the run stats meta from the root entity.

Similar to process, but returns a single value instead of a map.

This is a convenience method to read a single attribute.

Simplest usage:
```clojure
(p.eql/process-one env :foo)
```

Same as process, you can send initial data:
```clojure
(p.eql/process-one env {:data "here"} :foo)
```

You can also use joins and param expressions:
```clojure
(p.eql/process-one env {:join [:sub-query]})
(p.eql/process-one env '(:param {:expr "sion"}))
```

If the value returned supports meta, it will have the run stats meta from the root
entity.
sourceraw docstring

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.
sourceraw docstring

select-ast-envclj/s

(select-ast-env {:com.wsscode.pathom3.error/keys [lenient-mode?] :as env})
source

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

× close