Every property access on theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/michael-tiger-2010/dragonjson/llms.txt
Use this file to discover all available pages before exploring further.
server proxy chains a path segment and returns a new proxy. Nothing is fetched until you await the expression. Once a path is fetched, its data is stored in the local cache so that subsequent accesses to the same path or any of its children resolve instantly without a network call.
Awaiting a Path
a, b, c) appends a segment to the internal path array. When you await, dragonJSON calls resolvePath, traversing the cache first. If any segment is missing or marked stale (__next), it issues a fetch for the shallowest uncached segment and populates the cache before returning.
- If the resolved value is a primitive (string, number, boolean), it is returned directly.
- If the resolved value is an object, you get back another Proxy rooted at that path — not a plain JavaScript object.
If you
await a path whose value is an object, you get back another Proxy — not a plain object. Use Object.keys() on the awaited proxy to enumerate known cache keys.$prefetch(keys)
Parallel prefetch of sibling keys at the current scope. Signature:$prefetch(keys: string[]) → Promise<any[]>
$prefetch resolves each key in keys relative to the current proxy path, populating the cache for all of them. The return value is an array of resolved values (primitives or Proxies) in the same order as keys.
$exists()
Check if a path exists on the server, fetching it if not already cached. Signature:$exists() → Promise<boolean>
$exists calls resolvePath internally and returns true if it resolves to any value. If the fetch fails or the path resolves to undefined, it returns false — it never throws. This is useful for checking dynamic keys in __more collections where you don’t know which keys exist up front.
$loaded()
Check if a path is already present in the local cache without making any network request. Signature:$loaded() → Promise<boolean>
$loaded walks the cache along the path. It returns true only if every segment exists in rootData and none of them is a __next placeholder stub. Returns false if any segment is missing or is still unresolved.
$get(command)
Send a freeform query to the server without touching the cache. Signature:$get(command: object) → Promise<any>
$get appends ?path=<current-path>&command=<JSON> to the base URL and performs a plain GET. The server can return any JSON value. The result is returned directly to your code — it is never stored in the local cache.
This is the recommended escape hatch for transient queries such as pagination, full-text search, or any operation that returns data you do not want to cache.