Liking cljdoc? Tell your friends :D

com.wsscode.pathom3.format.eql

Helpers to manipulate EQL.

Helpers to manipulate EQL.
raw docstring

ast-contains-wildcard?clj/s

(ast-contains-wildcard? {:keys [children]})

Check if some of the AST children is the wildcard value, which is *.

Check if some of the AST children is the wildcard value, which is *.
raw docstring

data->queryclj/s

(data->query data)

Helper function to transform a data into an output shape.

Helper function to transform a data into an output shape.
raw docstring

extend-ast-with-wildcardclj/s

(extend-ast-with-wildcard source children)

ident-keyclj/s

(ident-key key)

When key is an ident, return the first part of it. Otherwise returns nil.

When key is an ident, return the first part of it. Otherwise returns nil.
raw docstring

include-extra-attrsclj/s

(include-extra-attrs children attrs)

index-astclj/s

(index-ast {:keys [children]})

map-children->childrenclj/s

(map-children->children map-children)

map-selectclj/s

(map-select env source tx)

Starting from a map, do a EQL selection on that map. Think of this function as a power up version of select-keys.

Example: (p/map-select {:foo "bar" :deep {:a 1 :b 2}} [{:deep [:a]}]) => {:deep {:a 1}}

Starting from a map, do a EQL selection on that map. Think of this function as
a power up version of select-keys.

Example:
(p/map-select {:foo "bar" :deep {:a 1 :b 2}} [{:deep [:a]}])
=> {:deep {:a 1}}
raw docstring

map-select-astclj/s

(map-select-ast {:com.wsscode.pathom3.format.eql/keys [map-select-include]
                 :as env}
                source
                ast)

Same as map-select, but using AST as source.

Same as map-select, but using AST as source.
raw docstring

map-select-entryclj/s

(map-select-entry env source {:keys [key query type] :as ast})

maybe-merge-union-astclj/s

(maybe-merge-union-ast ast)

Check if AST entry is a union, if so it computes a new AST entry by combining all union paths as a single entry.

Check if AST entry is a union, if so it computes a new AST entry by combining
all union paths as a single entry.
raw docstring

merge-ast-childrenclj/s

(merge-ast-children ast1 ast2)

pick-union-entryclj/s

(pick-union-entry ast m)

Check if ast children is a union type. If so, makes a decision to choose a path and return that AST.

Check if ast children is a union type. If so, makes a decision to choose a path and
return that AST.
raw docstring

propclj/s

(prop k)

query-root-propertiesclj/s

(query-root-properties query)

Returns a vector with the properties at the root of the query.

For example:

(query-root-properties [{:a [:b]} :c]) => [:a :c]

In case the query is a union query, it will merge the roots of then will merge:

(query-root-properties {:foo [{:a [:b]} :c] :bar [:a :d]}) => [:a :c :d]

Returns a vector with the properties at the root of the query.

For example:

  (query-root-properties [{:a [:b]} :c])
  => [:a :c]

In case the query is a union query, it will merge the roots of then will merge:

  (query-root-properties {:foo [{:a [:b]} :c]
                          :bar [:a :d]})
  => [:a :c :d]
raw docstring

recursive-query?clj/s

(recursive-query? query)

union->rootclj/s

(union->root ast)

Convert a union entry to a root.

Convert a union entry to a root.
raw docstring

union-childrenclj/s

(union-children ast)

Get union children when its an union, otherwise return nil.

Get union children when its an union, otherwise return nil.
raw docstring

union-children?clj/s

(union-children? ast)

Given an AST point, check if the children is a union query type.

Given an AST point, check if the children is a union query type.
raw docstring

union-key-on-data?clj/s

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

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

× close