Skip to content

publishExternalResult

function publishExternalResult(
schema,
values,
storage,
options?
): Promise<ExternalRef>;

Defined in: src/external.ts:453

Convenience over publishExternal: build the 1-row result batch for schema (a method’s resultSchema, e.g. protocol.getMethod("catalog")!.resultSchema) from values – the same { result: value } record a handler would return – and publish it.

Parameter Type
schema VgiSchema
values Record<string, any>
storage ExternalStorage
options PublishExternalOptions

Promise<ExternalRef>

TypeError if a non-nullable result field is missing from values.