cqrs()
Create a graph-visible CQRS bundle. Command dispatch is only DATA on the
returned command node; all derived facts flow through declared graph deps.
Import
Section titled “Import”import { cqrs } from "@graphrefly/ts/cqrs";Signature
Section titled “Signature”function cqrs( graph: Graph, opts: CqrsOptions<TCommand, TEvent> = {},): CqrsBundle<TCommand, TEvent>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
graph | Graph | Graph that owns the created nodes or projector. |
opts | CqrsOptions<TCommand, TEvent> | Options that configure the helper. |
Returns
Section titled “Returns”A CqrsBundle<TCommand, TEvent> value.
Example
Section titled “Example”import { cqrs } from "@graphrefly/ts/cqrs";Source
Section titled “Source”packages/ts/src/cqrs/index.ts