Skip to content
TypeWire

@tahanabavi/type-devtools-core

v1.2.0

Transport-agnostic inspector bridge for the TypeFetch ecosystem (timeline, overrides, generic Source protocol).

Query cache

The timeline is an append-only log; a query cache is a set of stateful entities, so it gets its own store. connectQueryClient subscribes to the engine's event bus, re-reads the authoritative query list, and exposes the three actions a cache view offers:

ts
import { connectQueryClient } from '@tahanabavi/type-devtools-core'

const queries = connectQueryClient(queryClient) // a QueryInspector
queries.getSnapshot() // { queries: [...], mutations: [...] }
queries.refetch(query) // refetch / invalidate / remove by { endpointId, input }
queries.dispose() // detach (the timeline connectors return a detach fn instead)

The client is typed structurally as QueryClientLike, so attaching it adds no dependency on the query engine.