(clear store)Returns a store with entities cleared out.
Returns a store with entities cleared out.
(create-store &
{:keys [id-fn entities cache-redirects cache-key]
:or {id-fn :id
entities {}
cache-redirects {}
cache-key :artemis.stores.mapgraph.core/cache}})Returns a new MapGraphStore for the given parameters:
:id-fn A function that will be passed an entity and should
return a unique value that will be used as a reference
to that entity. Defaults to :id.:entities A map of stored entities. Defaults to {}.:cache-redirects A map of of field to function, that redirects the root
from whence the selection-set will be resolved. Defaults
to {}.:cache-key The default generic key for the store's cache. Defaults
to :artemis.stores.mapgrah.core/cache.Returns a new `MapGraphStore` for the given parameters:
- `:id-fn` A function that will be passed an entity and should
return a unique value that will be used as a reference
to that entity. Defaults to `:id`.
- `:entities` A map of stored entities. Defaults to `{}`.
- `:cache-redirects` A map of of field to function, that redirects the root
from whence the selection-set will be resolved. Defaults
to `{}`.
- `:cache-key` The default generic key for the store's cache. Defaults
to `:artemis.stores.mapgrah.core/cache`.This store requires that every entity meant to normalize for a
GraphQL query resolves a unique value when called against the
store's :id-fn.
This store requires that every entity meant to normalize for a GraphQL query resolves a unique value when called against the store's `:id-fn`.
(store? store)Returns true if store is a mapgraph store.
Returns `true` if `store` is a mapgraph store.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |