Use this file to discover all available pages before exploring further.
dragonJSON(url, options) is the single entry point for the dragonJSON client. It returns a two-element array [server, control]. The server proxy is how you read and mutate data; control provides runtime configuration and debugging utilities.
Coalesce concurrent fetches into a single GET ?paths= request. When multiple paths are awaited in the same tick, they are debounced and sent together in one round trip.
Custom log function used instead of console.log when debug is true. Receives the same variadic arguments dragonJSON would otherwise pass to console.log.Signature:(...args: any[]) => void
Send target and hierarchical=true query parameters on single-path fetches. This allows the server to return a __batch envelope containing multiple related paths in one response, reducing subsequent round trips.
Enable real-time cache sync across clients via a relay (e.g. WebSocket, BroadcastChannel). When any client mutates data, all other connected clients are notified, their caches are invalidated, and their $on() listeners fire automatically.
Called automatically after every local mutation ($set, $add, $remove). Broadcast the provided msg object to your relay so other clients receive the invalidation.Signature:(msg: object) => void
Called once at initialization. You receive a callback cb; register it as your relay’s inbound message handler. dragonJSON will call cb with each incoming relay message and apply the invalidation locally without re-relaying.Signature:(cb: (message: object) => void) => void
The root proxy. Every property access chains a path segment; await triggers a fetch and cache lookup. Use $ methods on this proxy to mutate data. See Reading Data and Mutations.
Merge ops into the current options object at runtime. Useful for toggling debug mode or updating auth tokens without recreating the client.Signature:setOptions(ops: object) => void
If debugLockedOff was set at initialization (or is included in ops), debug mode cannot be re-enabled — the debug key in any future setOptions call is silently forced to false.