Liking cljdoc? Tell your friends :D

com.wsscode.pathom3.connect.runner


add-taken-path!clj/s

(add-taken-path! {:com.wsscode.pathom3.connect.runner/keys [node-run-stats*]}
                 {:com.wsscode.pathom3.connect.planner/keys [node-id]}
                 taken-path-id)
source

all-requires-ready?clj/s

(all-requires-ready? env {:com.wsscode.pathom3.connect.planner/keys [expects]})

Check if all requirements from the node are present in the current entity.

Check if all requirements from the node are present in the current entity.
sourceraw docstring

assoc-end-plan-statsclj/s

(assoc-end-plan-stats env plan)
source

batch-hold-tokenclj/s

(batch-hold-token env cache? op-name node cache-store input-data)
source

cache-batch-itemclj/s

(cache-batch-item
  {env' :com.wsscode.pathom3.connect.runner/env
   :com.wsscode.pathom3.connect.runner/keys [node-resolver-input]
   :com.wsscode.pathom3.connect.operation/keys [cache? cache-store]
   :as batch-item}
  batch-op
  response)
source

check-entity-requires!clj/s

(check-entity-requires! {:com.wsscode.pathom3.connect.planner/keys [graph]
                         :com.wsscode.pathom3.path/keys [path]
                         :as env})

Verify if entity contains all required keys from graph index-ast. This is shallow check (don't visit nested entities).

Verify if entity contains all required keys from graph index-ast. This is
shallow check (don't visit nested entities).
sourceraw docstring

choose-cache-storeclj/s

(choose-cache-store env cache-store)
source

combine-inputs-with-responsesclj/s

(combine-inputs-with-responses input-groups inputs responses)

For batch we group the items with the same inputs so the resolver only needs to have each input once. This function is a helper to side the input batch items with the distinct list of responses.

For batch we group the items with the same inputs so the resolver only needs to have
each input once. This function is a helper to side the input batch items with the
distinct list of responses.
sourceraw docstring

default-choose-pathclj/s

(default-choose-path env _or-node node-ids)
source

entry-astclj/s

(entry-ast graph k)

Get AST entry and pulls recursive query when needed.

Get AST entry and pulls recursive query when needed.
sourceraw docstring

fail-fastclj/s

(fail-fast {:com.wsscode.pathom3.error/keys [lenient-mode?]} error)
source

fail-or-errorclj/s

(fail-or-error or-node errors)
source

handle-or-errorclj/s

(handle-or-error env or-node res)
source

include-meta-statsclj/s

(include-meta-stats result
                    {:com.wsscode.pathom3.connect.runner/keys [omit-run-stats?]
                     :or {omit-run-stats? false}
                     :as env}
                    plan)
source

invoke-mutation!clj/s

(invoke-mutation! env {:keys [key] :as ast})

Run mutation from AST.

Run mutation from AST.
sourceraw docstring

invoke-resolver-from-nodeclj/s

(invoke-resolver-from-node env
                           {:com.wsscode.pathom3.connect.operation/keys
                              [op-name]
                            :com.wsscode.pathom3.connect.planner/keys [input]
                            :as node})

Evaluates a resolver using node information.

When this function runs the resolver, if filters the data to only include the keys mentioned by the resolver input. This is important to ensure that the resolver is not using some key that came accidentally due to execution order, that would lead to brittle executions.

Evaluates a resolver using node information.

When this function runs the resolver, if filters the data to only include the keys
mentioned by the resolver input. This is important to ensure that the resolver is
not using some key that came accidentally due to execution order, that would lead to
brittle executions.
sourceraw docstring

invoke-resolver-with-pluginsclj/s

(invoke-resolver-with-plugins resolver env input-data)
source

mark-batch-errorsclj/s

(mark-batch-errors e env batch-op batch-items)
source

mark-node-errorclj/s

(mark-node-error {:com.wsscode.pathom3.connect.runner/keys [node-run-stats*]
                  :as env}
                 {:com.wsscode.pathom3.connect.planner/keys [node-id]}
                 error)
source

mark-node-error-with-pluginsclj/s

(mark-node-error-with-plugins env node e)
source

merge-entity-dataclj/s

(merge-entity-data env entity new-data)

Specialized merge versions that work on entity data.

Specialized merge versions that work on entity data.
sourceraw docstring

merge-entity-to-root-dataclj/s

(merge-entity-to-root-data env env' node)
source

merge-mutation-stats!clj/s

(merge-mutation-stats! {:com.wsscode.pathom3.connect.runner/keys
                          [node-run-stats*]}
                       {:com.wsscode.pathom3.connect.operation/keys [op-name]}
                       data)
source

merge-node-stats!clj/s

(merge-node-stats! {:com.wsscode.pathom3.connect.runner/keys [node-run-stats*]}
                   {:com.wsscode.pathom3.connect.planner/keys [node-id]}
                   data)
source

merge-resolver-response!clj/s

(merge-resolver-response! env response)

This function gets the map returned from the resolver and merge the data in the current cache-tree.

This function gets the map returned from the resolver and merge the data in the
current cache-tree.
sourceraw docstring

missing-maybe-in-pending-batch?clj/s

(missing-maybe-in-pending-batch? {:com.wsscode.pathom3.path/keys [path] :as env}
                                 input)
source

normalize-ast-recursive-queryclj/s

(normalize-ast-recursive-query {:keys [query] :as ast} graph k)
source

placeholder-merge-entityclj/s

(placeholder-merge-entity {:com.wsscode.pathom3.connect.planner/keys [graph]
                           :com.wsscode.pathom3.connect.runner/keys
                             [source-entity]})

Create an entity to process the placeholder demands. This consider if the placeholder has params, params in placeholders means that you want some specific data at that point.

Create an entity to process the placeholder demands. This consider if the placeholder
has params, params in placeholders means that you want some specific data at that
point.
sourceraw docstring

plan-and-run!clj/s

(plan-and-run! env ast-or-graph entity-tree*)
source

priority-sortclj/s

(priority-sort {:com.wsscode.pathom3.connect.planner/keys [graph] :as env}
               node-ids)

Sort nodes based on the priority of the node successors. This scans all successors and choose which one has a node with the highest priority number.

Returns the paths and their highest priority, in order with the highest priority as first. For example:

[[4 [2 1]] [6 [1]]]

Means the first path is choosing node-id 4, and highest priority is 2.

Sort nodes based on the priority of the node successors. This scans all successors
and choose which one has a node with the highest priority number.

Returns the paths and their highest priority, in order with the highest priority as
first. For example:

    [[4 [2 1]] [6 [1]]]

Means the first path is choosing node-id 4, and highest priority is 2.
sourceraw docstring

process-attr-subqueryclj/s

(process-attr-subquery {:com.wsscode.pathom3.connect.planner/keys [graph]
                        :as env}
                       entity
                       k
                       v)
source

process-idents!clj/s

(process-idents! env idents)

Process the idents from the Graph, this will add the ident data into the child.

If there is ident data already, it gets merged with the ident value.

Process the idents from the Graph, this will add the ident data into the child.

If there is ident data already, it gets merged with the ident value.
sourceraw docstring

process-map-container-subqueryclj/s

(process-map-container-subquery env ast m)

Build a new map where the values are replaced with the map process of the subquery.

Build a new map where the values are replaced with the map process of the subquery.
sourceraw docstring

process-map-container?clj/s

(process-map-container? ast v)

Check if the map should be processed as a map-container, this means the sub-query should apply to the map values instead of the map itself.

This can be dictated by adding the ::pcr/map-container? meta data on the value, or requested by the query as part of the param.

Check if the map should be processed as a map-container, this means the sub-query
should apply to the map values instead of the map itself.

This can be dictated by adding the ::pcr/map-container? meta data on the value, or
requested by the query as part of the param.
sourceraw docstring

process-map-subqueryclj/s

(process-map-subquery env ast m)
source

process-map-subquery-dataclj/s

(process-map-subquery-data ast m)
source

process-mutations!clj/s

(process-mutations! {:com.wsscode.pathom3.connect.planner/keys [graph] :as env})

Runs the mutations gathered by the planner.

Runs the mutations gathered by the planner.
sourceraw docstring

process-sequence-subqueryclj/s

(process-sequence-subquery env ast s)
source

report-resolver-errorclj/s

(report-resolver-error {:com.wsscode.pathom3.path/keys [path]
                        :com.wsscode.pathom3.error/keys [lenient-mode?]
                        :as env}
                       {:com.wsscode.pathom3.connect.operation/keys [op-name]
                        :as node}
                       error)
source

report-resolver-io-statsclj/s

(report-resolver-io-stats {:com.wsscode.pathom3.connect.runner/keys
                             [omit-run-stats-resolver-io?]}
                          input-data
                          result)
source

resolver-already-ran?clj/s

(resolver-already-ran? {:com.wsscode.pathom3.connect.runner/keys
                          [node-run-stats*]}
                       {:com.wsscode.pathom3.connect.planner/keys [node-id]})
source

run-and-node!clj/s

(run-and-node! {:com.wsscode.pathom3.connect.planner/keys [graph] :as env}
               {:com.wsscode.pathom3.connect.planner/keys [run-and]
                :as and-node})

Given an AND node, runs every attached node, then runs the attached next.

Given an AND node, runs every attached node, then runs the attached next.
sourceraw docstring

run-batches!clj/s

(run-batches! env)
source

run-batches-pending!clj/s

(run-batches-pending! env)
source

run-batches-waiting!clj/s

(run-batches-waiting! env)
source

run-foreign-mutationclj/s

(run-foreign-mutation env {:keys [key] :as ast})
source

run-graph!clj/s

(run-graph! env ast-or-graph entity-tree*)

Plan and execute a request, given an environment (with indexes), the request AST and the entity-tree*.

Plan and execute a request, given an environment (with indexes), the request AST
and the entity-tree*.
sourceraw docstring

run-graph!*clj/s

(run-graph!* {:com.wsscode.pathom3.connect.planner/keys [graph] :as env})

Run the root node of the graph. As resolvers run, the result will be add to the entity cache tree.

Run the root node of the graph. As resolvers run, the result will be add to the
entity cache tree.
sourceraw docstring

run-graph-done!clj/s

(run-graph-done! env)
source

run-graph-entity-doneclj/s

(run-graph-entity-done env)
source

run-graph-impl!clj/s

(run-graph-impl! env ast-or-graph entity-tree*)
source

run-graph-with-pluginsclj/s

(run-graph-with-plugins env ast-or-graph entity-tree* impl!)
source

run-next-node!clj/s

(run-next-node! {:com.wsscode.pathom3.connect.planner/keys [graph] :as env}
                {:com.wsscode.pathom3.connect.planner/keys [run-next]})

Runs the next node associated with the node, in case it exists.

Runs the next node associated with the node, in case it exists.
sourceraw docstring

run-node!clj/s

(run-node! env node)

Run a node from the compute graph. This will start the processing on the sent node and them will run everything that's connected to this node as sequences of it.

The result is going to build up at ::p.ent/cache-tree*, after the run is concluded the output will be there.

Run a node from the compute graph. This will start the processing on the sent node
and them will run everything that's connected to this node as sequences of it.

The result is going to build up at ::p.ent/cache-tree*, after the run is concluded
the output will be there.
sourceraw docstring

run-or-node!clj/s

(run-or-node! {:com.wsscode.pathom3.connect.planner/keys [graph]
               :com.wsscode.pathom3.connect.runner/keys [choose-path]
               :or {choose-path default-choose-path}
               :as env}
              {:com.wsscode.pathom3.connect.planner/keys [run-or] :as or-node})
source

run-resolver-node!clj/s

(run-resolver-node! env node)

This function evaluates the resolver associated with the node.

First it checks if the expected results from the resolver are already available. In case they are, the resolver call is skipped.

This function evaluates the resolver associated with the node.

First it checks if the expected results from the resolver are already available. In
case they are, the resolver call is skipped.
sourceraw docstring

run-root-node!clj/s

(run-root-node! {:com.wsscode.pathom3.connect.planner/keys [graph] :as env})
source

setup-runner-envclj/s

(setup-runner-env env entity-tree* cache-type)
source

special-resolver-signal?clj/s

(special-resolver-signal? response)
source

union-key-on-data?clj/s

(union-key-on-data? {:keys [union-key]} m)
source

valid-resolver-response?clj/s

(valid-resolver-response? x)
source

validate-response!clj/s

(validate-response! env
                    {:com.wsscode.pathom3.connect.operation/keys [op-name]
                     :as node}
                    response)
source

wait-batch-responseclj/s

(wait-batch-response env node)
source

warn-batch-unsupportedclj/s

(warn-batch-unsupported env op-name)
source

with-resolver-cacheclj/s

(with-resolver-cache env)
(with-resolver-cache env cache*)
source

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

× close