Liking cljdoc? Tell your friends :D

artemis.stores.mapgraph.read


pullcljs

(pull {:keys [entities] :as store} pattern lookup-ref & [gql-context])

Returns a map representation of the entity found at lookup ref in db. Builds nested maps following a pull pattern.

A pull pattern is a vector containing any of the following forms:

:key If the entity contains :key, includes it in the result.

'* (literal symbol asterisk) Includes all keys from the entity in the result.

{ :key sub-pattern } The entity's value for key is a lookup ref or collection of lookup refs. Expands each lookup ref to the entity it refers to, then applies pull to each of those entities using the sub-pattern.

~~ For devs working on the internals ~~ If you pass in a gql-context, the keys and refs in the pull pattern must all be gql selections from the generated ast. There's no support for handling pull patterns that are combination of selections and normal keys

Returns a map representation of the entity found at lookup ref in
db. Builds nested maps following a pull pattern.

A pull pattern is a vector containing any of the following forms:

   :key  If the entity contains :key, includes it in the result.

   '*    (literal symbol asterisk) Includes all keys from the entity
         in the result.

   { :key sub-pattern }
         The entity's value for key is a lookup ref or collection of
         lookup refs. Expands each lookup ref to the entity it refers
         to, then applies pull to each of those entities using the
         sub-pattern.

~~ For devs working on the internals ~~
   If you pass in a gql-context, the keys and refs in the pull pattern
   must all be gql selections from the generated ast. There's no support for
   handling pull patterns that are combination of selections and normal keys
sourceraw docstring

read-from-cachecljs

(read-from-cache document input-vars store return-partial?)
source

read-from-entitycljs

(read-from-entity document ent-ref store return-partial?)
source

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

× close