GraphReFlyTS

API Reference

cqrsEventOutboxCommands()

Creates a CQRS event outbox commands.

Import

import { cqrsEventOutboxCommands } from "@graphrefly/ts/cqrs/messaging";

Signature

function cqrsEventOutboxCommands(
	graph: Graph,
	events: Node<CqrsEvent<TEvent>>,
	topic: string,
	opts: { readonly name?: string } = {},
): Node<MessageBusCommand>

Parameters

ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
eventsNode<CqrsEvent<TEvent>>Event node or event collection to consume.
topicstringtopic value used by the helper.
opts{ readonly name?: string }Options that configure the helper.

Returns

The CQRS event outbox commands result.

Example

import { cqrsEventOutboxCommands } from "@graphrefly/ts/cqrs/messaging";

Source

packages/ts/src/cqrs/messaging.ts