Skip to content
qt

Chapter 4Advanced

Edge cases, resilience, and power features

Multi-tab sync, reconnection recovery, rapid-fire mutations, scope isolation — the patterns that make query-tags production-ready. These are the demos you show before deploying to prod.

8 demosProduction patternsAll newStart with Multi-Tab Sync →

The Demos

New
1

Multi-Tab Sync

Advanced

SSE broadcasts everywhere

Open two browser tabs and watch them stay in sync. SSE naturally delivers invalidation events to every connected client.

SSEbroadcast
Explore →
New
2

Reconnection

Advanced

Graceful recovery

Simulate a network failure and watch the system reconnect and re-sync missed invalidations without data loss.

reconnectresilience
Explore →
New
3

Rapid-Fire

Advanced

10 mutations, zero races

Fire 10 mutations back-to-back and observe that the final state is always correct with no race conditions.

deduplicationbatching
Explore →
New
4

Scope Isolation

Advanced

Multi-tenant safety

Each tenant gets its own scope. Tenant A's mutations cannot invalidate Tenant B's queries. Full isolation by design.

appTags.scope(tenantId)isolation
Explore →
New
5

Cascading Tags

Advanced

Visualize the hierarchy

An interactive tree visualizing how parent tag invalidation cascades down to every child query in the hierarchy.

tag hierarchycascade
Explore →
New
6

Optimistic Updates

Advanced

Instant + correct

Optimistic UI with tag-based server validation. The UI updates instantly, and the server confirms or rolls back.

useOptimisticrollback
Explore →
New
7

Path Registry

Advanced

Dynamic tag registration

Register tags at runtime based on route paths. Useful for dynamic resources that aren't known at compile time.

pathRegistrydynamic tags
Explore →
New
8

Auth Middleware

Advanced

Protect the SSE endpoint

The SSE endpoint is transport-agnostic. Add session, token, or scope-based auth at the route level — no library lock-in.

authmiddleware
Explore →