true when the local copy is considered authoritative (e.g. PGlite
false when the remote is authoritative (Tier-B REST hybrid) — the
cache is a hint, not the truth.
OptionalgetFetch a single row by id. Optional.
Derive the stable string id of a row. Used by the engine to write into the entity graph under the right id key.
Fetch a list. The signal in q.signal MUST be honoured.
OptionalstaleStale-time hint in ms. The engine SWR logic refetches when
Date.now() - lastFetched > staleTime. Omit to inherit the engine
default (30s).
OptionalsubscribeSubscribe to realtime change events for this entity type. Optional.
Called by useEntities / useEntityQuery exactly once per
subscriber-bearing key. The returned function MUST tear down all
underlying resources (sockets, channels, intervals).
The full per-entity transport contract.
One transport per entity type, registered at app boot. The hooks (
useEntities,useEntityQuery) look it up viagetEntityTransport(type).Required:
identify,authoritative,list. Optional:get(for single-row fetches),subscribe(for realtime),staleTime(hint for SWR).