Skip to content
PACKAGES

appendLogCommittedFactJournal()

Build a single-writer committed-fact journal over one passive append log.

One canonical batch is one storage entry, so readable storage never exposes a partial batch. Calls through one handle are serialized. Competing handles, retention, migration, restore, hot hydration, and domain materialization are deliberately outside this contract.

import { appendLogCommittedFactJournal } from "@graphrefly/ts/committed-facts";
function appendLogCommittedFactJournal(opts: AppendLogCommittedFactJournalOptions<TFact, TBatch, TCursor>): CommittedFactJournalBackend<TBatch, TFact, TCursor>
ParameterTypeDescription
optsAppendLogCommittedFactJournalOptions<TFact, TBatch, TCursor>Passive append log, domain validator/cursor profile, and bounded diagnostics.

A serialized domain-neutral committed-fact journal handle.

import { appendLogCommittedFactJournal } from "@graphrefly/ts/committed-facts";
import { memoryAppendLog } from "@graphrefly/ts/storage";
const journal = appendLogCommittedFactJournal({
log: memoryAppendLog("work-facts"),
profile,
});

packages/ts/src/committed-facts/index.ts