API reference › @evolu/common › local‑first/Protocol › ApplyProtocolMessageAsRelayResult

Defined in: packages/common/src/local-first/Protocol.ts:1397

Result type for applyProtocolMessageAsRelay.

Unlike ApplyProtocolMessageAsClientResult, a relay answers every request it can decode within its totalMaxSize to provide sync completion feedback. This ensures the initiator can reliably detect when synchronization is complete, even when there's nothing to sync. A storage that throws while validating the write key is answered with a WriteError code, like a failed write. For a larger request or one it cannot decode, applyProtocolMessageAsRelay returns ProtocolInvalidDataError before subscribing, storing, or broadcasting anything, and the relay sends nothing. Clients may choose not to respond in certain cases (like when they receive broadcast messages or when they lack a write key for syncing).

Extends

Properties

message

readonly message: ProtocolMessage;

Defined in: packages/common/src/local-first/Protocol.ts:1398


type

readonly type: "Response";

Defined in: packages/common/src/Type.ts:19326

Inherited from

Typed.type