DevTools
Inspect and debug SoulCache runtime state
DevTools
SoulCache DevTools provides real-time inspection of the runtime cache, queries, mutations, and performance.
Installation
Quick Start
Render SoulCacheDevToolsPanel inside the SoulCacheProvider:
Features
- Floating panel toggled with the keyboard shortcut (Ctrl/Cmd+Shift+D)
- Query, Mutation, and Cache inspection
- Timeline recording with event filtering
- Performance metrics with p50, p95, and p99 latencies
- Health diagnostics with recommendations
- Session recording and replay
Tabs
The panel exposes six tabs:
| Tab | Contents |
|---|---|
| Queries | Query entries with status, data, and timestamps |
| Mutations | Mutation history with optimistic update context |
| Timeline | Event stream with type filtering |
| Metrics | Latency percentiles (p50, p95, p99) |
| Health | Diagnostics and configuration validation |
| Settings | Panel configuration options |
Hook
For programmatic access, use the useSoulCacheDevTools hook:
The hook accepts a QueryClient instance and an enabled flag, and returns a SoulCacheDevTools instance with captureSnapshot, getTimeline, getMetrics, checkHealth, and session recording (startRecording / stopRecording / exportRecording).
Package Overview
@soulcache/devtools-core— framework-agnostic inspection and diagnostics layer@soulcache/devtools— React panel built on@soulcache/devtools-core