This package is a resolve-query
adapter for storing a read model in Redis store. The adapter is based on the Redis client.
The store interface is implemented using the resolve-readmodel-redis
adapter and provides segregated read and write access:
- Read access is used to retrieve data from a store (for example, by a graphql resolver). The package provides the
hget(key, field)
asynchronous method to get the value associated with thefield
from the hash stored at thekey
. - Projection functions use Write access to update data. The following asynchronous methods are available:
hset(key, field, value)
- sets thevalue
associated with thefield
in the hash stored atkey
;del(key)
- deletes the hash stored at thekey
. Does nothing if thekey
does not exist.
Usage
;; const adapter = ; const testEventStore = Promise; const executeReadModel = const store = await ;const value = store;console