Skip to content

Graphorin API reference v0.8.0


Graphorin API reference / @graphorin/memory / / NextBatchHook

Type Alias: NextBatchHook

ts
type NextBatchHook = (args) => Promise<{
  nextCursor: string | null;
  rows: ReadonlyArray<MigrationRow>;
}>;

Defined in: packages/memory/src/migration/embedder-migration.ts:137

Per-batch loader. Returns up to batchSize rows for the supplied kind whose embedder_id is the source embedder. Returning an empty array signals end-of-stream.

Parameters

ParameterType
args{ batchSize: number; cursor: string | null; kind: "fact" | "episode" | "message"; source: string; target: string; }
args.batchSizenumber
args.cursorstring | null
args.kind"fact" | "episode" | "message"
args.sourcestring
args.targetstring

Returns

Promise<{ nextCursor: string | null; rows: ReadonlyArray&lt;MigrationRow&gt;; }>

Stable