@tahanabavi/typefetch-query-core
A framework-agnostic query engine for TypeWire contracts — cache, dedup, staleness, mutations, and declared invalidation — over HTTP and WebSocket alike, because it needs nothing but a callable endpoint carrying a stable id.
Overview
React-Query-like caching, keyed by the contract itself.
query-core is the data layer of TypeWire: cache, dedup, staleness, mutations, and declared invalidation. It imports no framework and no transport — it needs nothing but a callable endpoint carrying a stable id, which is exactly what a typefetch or typesocket module gives it.
Pair it with an adapter (typefetch-react) for hooks, or drive it directly through its Observable contract (subscribe / getSnapshot) — the same seam a Vue or Angular adapter would bind.
You pass an endpoint and its input — two arguments, no query key and no query function. The engine derives the cache key from the contract's own stable id, so nothing downstream ever names a key by hand.