cqrsSubmitCommand()
Creates a CQRS submit command.
Import
Section titled “Import”import { cqrsSubmitCommand } from "@graphrefly/ts/cqrs/work-queue";Signature
Section titled “Signature”function cqrsSubmitCommand( command: CqrsCommand<TCommand>, opts: { readonly workId?: string; readonly commandId?: string; readonly idempotencyKey?: string; readonly sourceRefs?: readonly string[]; readonly policyRefs?: readonly string[]; readonly actorRefs?: readonly string[]; readonly auditRefs?: readonly string[]; readonly metadata?: Record<string, unknown>; } = {},): WorkQueueCommand<CqrsQueuedCommandPayload<TCommand>>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
command | CqrsCommand<TCommand> | command value used by the helper. |
opts | { readonly workId?: string; readonly commandId?: string; readonly idempotencyKey?: string; readonly sourceRefs?: readonly string[]; readonly policyRefs?: readonly string[]; readonly actorRefs?: readonly string[]; readonly auditRefs?: readonly string[]; readonly metadata?: Record<string, unknown>; } | Options that configure the helper. |
Returns
Section titled “Returns”The CQRS submit command result.
Example
Section titled “Example”import { cqrsSubmitCommand } from "@graphrefly/ts/cqrs/work-queue";Source
Section titled “Source”packages/ts/src/cqrs/work-queue.ts