Skip to content

Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:

md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

Results

Theme Data

{
  "siteTitle": false,
  "logo": {
    "dark": "/logos/word-mark-white.svg",
    "light": "/logos/warp-drive-logo-dark.svg",
    "alt": "WarpDrive"
  },
  "nav": [
    {
      "text": "Guides",
      "link": "/guides"
    },
    {
      "text": "API Docs",
      "link": "/api"
    },
    {
      "text": "Contributing",
      "link": "/guides/contributing/become-a-contributor"
    }
  ],
  "sidebar": [
    {
      "text": "Installation",
      "index": 0,
      "collapsed": true,
      "items": [
        {
          "text": "Instructions",
          "index": 0,
          "link": "/guides/installation/index.md"
        }
      ],
      "link": "/guides/installation/index.md"
    },
    {
      "text": "Configuration",
      "index": 1,
      "collapsed": true,
      "items": [
        {
          "text": "Setup",
          "index": 0,
          "link": "/guides/configuration/index.md"
        },
        {
          "text": "Setup - Advanced",
          "index": 1,
          "link": "/guides/configuration/advanced.md"
        },
        {
          "text": "Setup - Legacy (Ember)",
          "index": 2,
          "link": "/guides/configuration/ember.md"
        },
        {
          "text": "Linting",
          "index": 3,
          "link": "/guides/configuration/linting.md"
        },
        {
          "text": "Older Packages (Ember Only)",
          "index": 4,
          "collapsed": true,
          "items": [
            {
              "text": "Overview",
              "index": 0,
              "link": "/guides/configuration/legacy-package-setup/index.md"
            },
            {
              "text": "Setup",
              "index": 1,
              "collapsed": true,
              "items": [
                {
                  "text": "Universal",
                  "index": 0,
                  "link": "/guides/configuration/legacy-package-setup/setup/universal.md"
                },
                {
                  "text": "Ember",
                  "index": 1,
                  "link": "/guides/configuration/legacy-package-setup/setup/ember.md"
                }
              ],
              "link": "/guides/configuration/legacy-package-setup/setup/universal.md"
            }
          ],
          "link": "/guides/configuration/legacy-package-setup/index.md"
        }
      ],
      "link": "/guides/configuration/index.md"
    },
    {
      "text": "The Manual",
      "index": 2,
      "collapsed": true,
      "link": "/guides/index.md",
      "items": [
        {
          "text": "Introduction",
          "index": 0,
          "link": "/guides/index.md"
        },
        {
          "text": "Requests",
          "index": 1,
          "collapsed": true,
          "items": [
            {
              "text": "Making Requests",
              "index": 0,
              "link": "/guides/the-manual/requests/index.md"
            },
            {
              "text": "Typing Requests",
              "index": 1,
              "link": "/guides/the-manual/requests/typing-requests.md"
            },
            {
              "text": "Using The Response",
              "index": 2,
              "link": "/guides/the-manual/requests/using-the-response.md"
            },
            {
              "text": "Builders",
              "index": 3,
              "link": "/guides/the-manual/requests/builders.md"
            },
            {
              "text": "Handlers",
              "index": 4,
              "link": "/guides/the-manual/requests/handlers.md"
            }
          ],
          "link": "/guides/the-manual/requests/index.md"
        },
        {
          "text": "Caching",
          "index": 2,
          "collapsed": true,
          "items": [
            {
              "text": "Overview",
              "index": 0,
              "link": "/guides/the-manual/caching/index.md"
            },
            {
              "text": "Key Terms",
              "index": 1,
              "link": "/guides/the-manual/caching/key-terms.md"
            }
          ],
          "link": "/guides/the-manual/caching/index.md"
        },
        {
          "text": "Schemas",
          "index": 3,
          "collapsed": true,
          "items": [
            {
              "text": "Overview",
              "index": 0,
              "link": "/guides/the-manual/schemas/index.md"
            },
            {
              "text": "Resource Schemas",
              "index": 1,
              "link": "/guides/the-manual/schemas/resource-schemas.md"
            },
            {
              "text": "Object Schemas",
              "index": 2,
              "link": "/guides/the-manual/schemas/object-schemas.md"
            },
            {
              "text": "Simple Fields",
              "index": 3,
              "link": "/guides/the-manual/schemas/simple-fields.md"
            },
            {
              "text": "Relational Fields",
              "index": 4,
              "link": "/guides/the-manual/schemas/relational-fields.md"
            },
            {
              "text": "Complex Fields",
              "index": 5,
              "link": "/guides/the-manual/schemas/complex-fields.md"
            },
            {
              "text": "Traits",
              "index": 6,
              "link": "/guides/the-manual/schemas/traits.md"
            },
            {
              "text": "Derivations",
              "index": 7,
              "link": "/guides/the-manual/schemas/derivations.md"
            },
            {
              "text": "Transformations",
              "index": 8,
              "link": "/guides/the-manual/schemas/transformations.md"
            },
            {
              "text": "Extensions",
              "index": 9,
              "link": "/guides/the-manual/schemas/extensions.md"
            }
          ],
          "link": "/guides/the-manual/schemas/index.md"
        },
        {
          "text": "Community Resources",
          "index": 4,
          "link": "/guides/the-manual/community-resources.md"
        },
        {
          "text": "Cookbook",
          "index": 5,
          "collapsed": true,
          "items": [
            {
              "text": "Index",
              "index": 0,
              "link": "/guides/the-manual/cookbook/index.md"
            },
            {
              "text": "Auth Handlers",
              "index": 1,
              "link": "/guides/the-manual/cookbook/auth-handlers.md"
            },
            {
              "text": "Basic Usage",
              "index": 2,
              "link": "/guides/the-manual/cookbook/basic-usage.md"
            },
            {
              "text": "Incremental Adoption Guide",
              "index": 3,
              "link": "/guides/the-manual/cookbook/incremental-adoption-guide.md"
            },
            {
              "text": "Naming Conventions",
              "index": 4,
              "link": "/guides/the-manual/cookbook/naming-conventions.md"
            }
          ],
          "link": "/guides/the-manual/cookbook/index.md"
        },
        {
          "text": "Advanced Topics",
          "index": 6,
          "collapsed": true,
          "items": [
            {
              "text": "Introduction",
              "index": 0,
              "link": "/guides/the-manual/concepts/index.md"
            },
            {
              "text": "Mutations",
              "index": 1,
              "link": "/guides/the-manual/concepts/mutations.md"
            },
            {
              "text": "Operations",
              "index": 2,
              "link": "/guides/the-manual/concepts/operations.md"
            },
            {
              "text": "Reactive Control Flow",
              "index": 3,
              "link": "/guides/the-manual/concepts/reactive-control-flow.md"
            },
            {
              "text": "Realtime",
              "index": 4,
              "link": "/guides/the-manual/concepts/realtime.md"
            }
          ],
          "link": "/guides/the-manual/concepts/index.md"
        },
        {
          "text": "Misc",
          "index": 7,
          "collapsed": true,
          "items": [
            {
              "text": "Overview",
              "index": 0,
              "link": "/guides/the-manual/misc/index.md"
            },
            {
              "text": "Links Mode",
              "index": 1,
              "link": "/guides/the-manual/misc/links-mode.md"
            },
            {
              "text": "Terminology",
              "index": 2,
              "link": "/guides/the-manual/misc/terminology.md"
            },
            {
              "text": "Typescript",
              "index": 3,
              "collapsed": true,
              "items": [
                {
                  "text": "Overview",
                  "index": 0,
                  "link": "/guides/the-manual/misc/typescript/index.md"
                },
                {
                  "text": "Configuration",
                  "index": 1,
                  "link": "/guides/the-manual/misc/typescript/configuration.md"
                },
                {
                  "text": "Installation",
                  "index": 2,
                  "link": "/guides/the-manual/misc/typescript/installation.md"
                },
                {
                  "text": "Typing Includes",
                  "index": 3,
                  "link": "/guides/the-manual/misc/typescript/typing-includes.md"
                },
                {
                  "text": "Typing Models",
                  "index": 4,
                  "link": "/guides/the-manual/misc/typescript/typing-models.md"
                },
                {
                  "text": "Why Brands",
                  "index": 5,
                  "link": "/guides/the-manual/misc/typescript/why-brands.md"
                }
              ],
              "link": "/guides/the-manual/misc/typescript/index.md"
            },
            {
              "text": "Relational Data",
              "index": 4,
              "collapsed": true,
              "items": [
                {
                  "text": "Overview",
                  "index": 0,
                  "link": "/guides/the-manual/misc/relational-data/index.md"
                },
                {
                  "text": "Features",
                  "index": 1,
                  "collapsed": true,
                  "items": [
                    {
                      "text": "Inverses",
                      "index": 0,
                      "link": "/guides/the-manual/misc/relational-data/features/inverses.md"
                    },
                    {
                      "text": "Polymorphism",
                      "index": 1,
                      "link": "/guides/the-manual/misc/relational-data/features/polymorphism.md"
                    }
                  ],
                  "link": "/guides/the-manual/misc/relational-data/features/inverses.md"
                },
                {
                  "text": "Configuration",
                  "index": 2,
                  "collapsed": true,
                  "items": [
                    {
                      "text": "Many To Many",
                      "index": 0,
                      "link": "/guides/the-manual/misc/relational-data/configuration/many-to-many.md"
                    },
                    {
                      "text": "Many To None",
                      "index": 1,
                      "link": "/guides/the-manual/misc/relational-data/configuration/many-to-none.md"
                    },
                    {
                      "text": "Many To One",
                      "index": 2,
                      "link": "/guides/the-manual/misc/relational-data/configuration/many-to-one.md"
                    },
                    {
                      "text": "One To Many",
                      "index": 3,
                      "link": "/guides/the-manual/misc/relational-data/configuration/one-to-many.md"
                    },
                    {
                      "text": "One To None",
                      "index": 4,
                      "link": "/guides/the-manual/misc/relational-data/configuration/one-to-none.md"
                    },
                    {
                      "text": "One To One",
                      "index": 5,
                      "link": "/guides/the-manual/misc/relational-data/configuration/one-to-one.md"
                    }
                  ],
                  "link": "/guides/the-manual/misc/relational-data/configuration/many-to-many.md"
                }
              ],
              "link": "/guides/the-manual/misc/relational-data/index.md"
            },
            {
              "text": "Reactivity",
              "index": 5,
              "collapsed": true,
              "items": [
                {
                  "text": "Overview",
                  "index": 0,
                  "link": "/guides/the-manual/misc/reactivity/index.md"
                },
                {
                  "text": "Polaris",
                  "index": 1,
                  "collapsed": true,
                  "items": [
                    {
                      "text": "Overview",
                      "index": 0,
                      "link": "/guides/the-manual/misc/reactivity/polaris/overview.md"
                    }
                  ],
                  "link": "/guides/the-manual/misc/reactivity/polaris/overview.md"
                },
                {
                  "text": "Legacy",
                  "index": 2,
                  "collapsed": true,
                  "items": [
                    {
                      "text": "Overview",
                      "index": 0,
                      "link": "/guides/the-manual/misc/reactivity/legacy/overview.md"
                    }
                  ],
                  "link": "/guides/the-manual/misc/reactivity/legacy/overview.md"
                }
              ],
              "link": "/guides/the-manual/misc/reactivity/index.md"
            },
            {
              "text": "Migrating",
              "index": 6,
              "collapsed": true,
              "items": [
                {
                  "text": "Two Store Migration",
                  "index": 0,
                  "link": "/guides/the-manual/misc/migrating/two-store-migration.md"
                }
              ],
              "link": "/guides/the-manual/misc/migrating/two-store-migration.md"
            }
          ],
          "link": "/guides/the-manual/misc/index.md"
        }
      ]
    },
    {
      "text": "Contributing",
      "index": 3,
      "collapsed": true,
      "items": [
        {
          "text": "Become A Contributor",
          "index": 0,
          "link": "/guides/contributing/become-a-contributor.md"
        },
        {
          "text": "Reporting Issues",
          "index": 1,
          "link": "/guides/contributing/issues.md"
        },
        {
          "text": "Setting Up The Project",
          "index": 2,
          "link": "/guides/contributing/setting-up-the-project.md"
        },
        {
          "text": "Project Architecture",
          "index": 3,
          "link": "/guides/contributing/project-architecture.md"
        },
        {
          "text": "Key Concepts",
          "index": 4,
          "link": "/guides/contributing/key-concepts.md"
        },
        {
          "text": "Writing Documentation",
          "index": 5,
          "link": "/guides/contributing/writing-api-docs.md"
        },
        {
          "text": "Submitting Prs",
          "index": 6,
          "link": "/guides/contributing/submitting-prs.md"
        },
        {
          "text": "The RFC Process",
          "index": 7,
          "link": "/guides/contributing/rfc-process.md"
        },
        {
          "text": "Performing A Release",
          "index": 8,
          "link": "/guides/contributing/RELEASE.md"
        },
        {
          "text": "The Project Roadmap",
          "index": 9,
          "link": "/guides/contributing/ROADMAP.md"
        }
      ],
      "link": "/guides/contributing/become-a-contributor.md"
    },
    {
      "text": "API Docs",
      "collapsed": true,
      "items": [
        {
          "text": "Universal"
        },
        {
          "text": "@warp-drive/core",
          "link": "/api/@warp-drive/core/",
          "collapsed": true,
          "items": [
            {
              "text": "exports",
              "items": [
                {
                  "text": "RequestManager",
                  "link": "/api/@warp-drive/core/classes/RequestManager.md"
                },
                {
                  "text": "Store",
                  "link": "/api/@warp-drive/core/classes/Store.md"
                },
                {
                  "text": "CacheHandler",
                  "link": "/api/@warp-drive/core/variables/CacheHandler.md"
                },
                {
                  "text": "Fetch",
                  "link": "/api/@warp-drive/core/variables/Fetch.md"
                },
                {
                  "text": "recordIdentifierFor",
                  "link": "/api/@warp-drive/core/functions/recordIdentifierFor.md"
                },
                {
                  "text": "setIdentifierForgetMethod",
                  "link": "/api/@warp-drive/core/functions/setIdentifierForgetMethod.md"
                },
                {
                  "text": "setIdentifierGenerationMethod",
                  "link": "/api/@warp-drive/core/functions/setIdentifierGenerationMethod.md"
                },
                {
                  "text": "setIdentifierResetMethod",
                  "link": "/api/@warp-drive/core/functions/setIdentifierResetMethod.md"
                },
                {
                  "text": "setIdentifierUpdateMethod",
                  "link": "/api/@warp-drive/core/functions/setIdentifierUpdateMethod.md"
                },
                {
                  "text": "setKeyInfoForResource",
                  "link": "/api/@warp-drive/core/functions/setKeyInfoForResource.md"
                },
                {
                  "text": "useRecommendedStore",
                  "link": "/api/@warp-drive/core/functions/useRecommendedStore.md"
                }
              ]
            },
            {
              "text": "/build-config",
              "link": "/api/@warp-drive/core/build-config/",
              "collapsed": true,
              "items": [
                {
                  "text": "/babel-macros",
                  "link": "/api/@warp-drive/core/build-config/babel-macros/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/canary-features",
                  "link": "/api/@warp-drive/core/build-config/canary-features/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/debugging",
                  "link": "/api/@warp-drive/core/build-config/debugging/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/deprecations",
                  "link": "/api/@warp-drive/core/build-config/deprecations/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/env",
                  "link": "/api/@warp-drive/core/build-config/env/"
                },
                {
                  "text": "/macros",
                  "link": "/api/@warp-drive/core/build-config/macros/"
                }
              ]
            },
            {
              "text": "/configure",
              "link": "/api/@warp-drive/core/configure/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/reactive",
              "link": "/api/@warp-drive/core/reactive/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/request",
              "link": "/api/@warp-drive/core/request/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/store",
              "link": "/api/@warp-drive/core/store/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/types",
              "link": "/api/@warp-drive/core/types/",
              "collapsed": true,
              "items": [
                {
                  "text": "/cache",
                  "link": "/api/@warp-drive/core/types/cache/",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/aliases",
                      "link": "/api/@warp-drive/core/types/cache/aliases/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/change",
                      "link": "/api/@warp-drive/core/types/cache/change/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/mutations",
                      "link": "/api/@warp-drive/core/types/cache/mutations/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/operations",
                      "link": "/api/@warp-drive/core/types/cache/operations/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/relationship",
                      "link": "/api/@warp-drive/core/types/cache/relationship/",
                      "collapsed": true,
                      "items": []
                    }
                  ]
                },
                {
                  "text": "/graph",
                  "link": "/api/@warp-drive/core/types/graph/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/identifier",
                  "link": "/api/@warp-drive/core/types/identifier/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/json",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/raw",
                      "link": "/api/@warp-drive/core/types/json/raw/",
                      "collapsed": true,
                      "items": []
                    }
                  ]
                },
                {
                  "text": "/params",
                  "link": "/api/@warp-drive/core/types/params/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/record",
                  "link": "/api/@warp-drive/core/types/record/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/request",
                  "link": "/api/@warp-drive/core/types/request/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/runtime",
                  "link": "/api/@warp-drive/core/types/runtime/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/schema",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/concepts",
                      "link": "/api/@warp-drive/core/types/schema/concepts/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/fields",
                      "link": "/api/@warp-drive/core/types/schema/fields/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/fields.type-test",
                      "link": "/api/@warp-drive/core/types/schema/fields.type-test/"
                    },
                    {
                      "text": "/schema-service",
                      "link": "/api/@warp-drive/core/types/schema/schema-service/",
                      "collapsed": true,
                      "items": []
                    }
                  ]
                },
                {
                  "text": "/spec",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/document",
                      "link": "/api/@warp-drive/core/types/spec/document/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/error",
                      "link": "/api/@warp-drive/core/types/spec/error/",
                      "collapsed": true,
                      "items": []
                    },
                    {
                      "text": "/json-api-raw",
                      "link": "/api/@warp-drive/core/types/spec/json-api-raw/",
                      "collapsed": true,
                      "items": []
                    }
                  ]
                },
                {
                  "text": "/symbols",
                  "link": "/api/@warp-drive/core/types/symbols/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/utils",
                  "link": "/api/@warp-drive/core/types/utils/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/utils",
              "collapsed": true,
              "items": [
                {
                  "text": "/string",
                  "link": "/api/@warp-drive/core/utils/string/",
                  "collapsed": true,
                  "items": []
                }
              ]
            }
          ]
        },
        {
          "text": "@warp-drive/experiments",
          "link": "/api/@warp-drive/experiments/",
          "collapsed": true,
          "items": [
            {
              "text": "/data-worker",
              "link": "/api/@warp-drive/experiments/data-worker/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/document-storage",
              "link": "/api/@warp-drive/experiments/document-storage/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/image-fetch",
              "link": "/api/@warp-drive/experiments/image-fetch/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/image-worker",
              "link": "/api/@warp-drive/experiments/image-worker/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/worker-fetch",
              "link": "/api/@warp-drive/experiments/worker-fetch/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@warp-drive/json-api",
          "link": "/api/@warp-drive/json-api/",
          "collapsed": true,
          "items": []
        },
        {
          "text": "@warp-drive/legacy",
          "link": "/api/@warp-drive/legacy/",
          "collapsed": true,
          "items": [
            {
              "text": "exports",
              "items": [
                {
                  "text": "useLegacyStore",
                  "link": "/api/@warp-drive/legacy/functions/useLegacyStore.md"
                }
              ]
            },
            {
              "text": "/adapter",
              "link": "/api/@warp-drive/legacy/adapter/",
              "collapsed": true,
              "items": [
                {
                  "text": "/error",
                  "link": "/api/@warp-drive/legacy/adapter/error/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/json-api",
                  "link": "/api/@warp-drive/legacy/adapter/json-api/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/rest",
                  "link": "/api/@warp-drive/legacy/adapter/rest/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/compat",
              "link": "/api/@warp-drive/legacy/compat/",
              "collapsed": true,
              "items": [
                {
                  "text": "/builders",
                  "link": "/api/@warp-drive/legacy/compat/builders/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/extensions",
                  "link": "/api/@warp-drive/legacy/compat/extensions/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/utils",
                  "link": "/api/@warp-drive/legacy/compat/utils/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/model",
              "link": "/api/@warp-drive/legacy/model/",
              "collapsed": true,
              "items": [
                {
                  "text": "/migration-support",
                  "link": "/api/@warp-drive/legacy/model/migration-support/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/serializer",
              "link": "/api/@warp-drive/legacy/serializer/",
              "collapsed": true,
              "items": [
                {
                  "text": "/json",
                  "link": "/api/@warp-drive/legacy/serializer/json/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/json-api",
                  "link": "/api/@warp-drive/legacy/serializer/json-api/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/rest",
                  "link": "/api/@warp-drive/legacy/serializer/rest/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/transform",
                  "link": "/api/@warp-drive/legacy/serializer/transform/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/store",
              "link": "/api/@warp-drive/legacy/store/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@warp-drive/utilities",
          "link": "/api/@warp-drive/utilities/",
          "collapsed": true,
          "items": [
            {
              "text": "exports",
              "items": [
                {
                  "text": "buildBaseURL",
                  "link": "/api/@warp-drive/utilities/functions/buildBaseURL.md"
                },
                {
                  "text": "buildQueryParams",
                  "link": "/api/@warp-drive/utilities/functions/buildQueryParams.md"
                },
                {
                  "text": "filterEmpty",
                  "link": "/api/@warp-drive/utilities/functions/filterEmpty.md"
                },
                {
                  "text": "setBuildURLConfig",
                  "link": "/api/@warp-drive/utilities/functions/setBuildURLConfig.md"
                },
                {
                  "text": "sortQueryParams",
                  "link": "/api/@warp-drive/utilities/functions/sortQueryParams.md"
                }
              ]
            },
            {
              "text": "/active-record",
              "link": "/api/@warp-drive/utilities/active-record/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/derivations",
              "link": "/api/@warp-drive/utilities/derivations/",
              "collapsed": true,
              "items": [
                {
                  "text": "/Namespaces",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/concat",
                      "link": "/api/@warp-drive/utilities/derivations/namespaces/concat/"
                    }
                  ]
                }
              ]
            },
            {
              "text": "/handlers",
              "link": "/api/@warp-drive/utilities/handlers/",
              "collapsed": true,
              "items": [
                {
                  "text": "/Handlers",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/AutoCompress",
                      "link": "/api/@warp-drive/utilities/handlers/classes/AutoCompress.md"
                    },
                    {
                      "text": "/Gate",
                      "link": "/api/@warp-drive/utilities/handlers/classes/Gate.md"
                    },
                    {
                      "text": "/MetaDocHandler",
                      "link": "/api/@warp-drive/utilities/handlers/variables/MetaDocHandler.md"
                    }
                  ]
                },
                {
                  "text": "/Constants",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/MAX_URL_LENGTH",
                      "link": "/api/@warp-drive/utilities/handlers/variables/MAX_URL_LENGTH.md"
                    },
                    {
                      "text": "/SupportsRequestStreams",
                      "link": "/api/@warp-drive/utilities/handlers/variables/SupportsRequestStreams.md"
                    },
                    {
                      "text": "/TAB_ASSIGNED",
                      "link": "/api/@warp-drive/utilities/handlers/variables/TAB_ASSIGNED.md"
                    },
                    {
                      "text": "/TAB_ID",
                      "link": "/api/@warp-drive/utilities/handlers/variables/TAB_ID.md"
                    }
                  ]
                },
                {
                  "text": "/Utility Functions",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/addTraceHeader",
                      "link": "/api/@warp-drive/utilities/handlers/functions/addTraceHeader.md"
                    },
                    {
                      "text": "/assertInvalidUrlLength",
                      "link": "/api/@warp-drive/utilities/handlers/functions/assertInvalidUrlLength.md"
                    }
                  ]
                }
              ]
            },
            {
              "text": "/json-api",
              "link": "/api/@warp-drive/utilities/json-api/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/rest",
              "link": "/api/@warp-drive/utilities/rest/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/string",
              "link": "/api/@warp-drive/utilities/string/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "Frameworks"
        },
        {
          "text": "@warp-drive/ember",
          "link": "/api/@warp-drive/ember/",
          "collapsed": true,
          "items": [
            {
              "text": "exports",
              "items": [
                {
                  "text": "Await",
                  "link": "/api/@warp-drive/ember/classes/Await.md"
                },
                {
                  "text": "Request",
                  "link": "/api/@warp-drive/ember/classes/Request.md"
                },
                {
                  "text": "Throw",
                  "link": "/api/@warp-drive/ember/classes/Throw.md"
                },
                {
                  "text": "createRequestSubscription",
                  "link": "/api/@warp-drive/ember/functions/createRequestSubscription.md"
                },
                {
                  "text": "getPromiseState",
                  "link": "/api/@warp-drive/ember/functions/getPromiseState.md"
                },
                {
                  "text": "getRequestState",
                  "link": "/api/@warp-drive/ember/functions/getRequestState.md"
                }
              ]
            },
            {
              "text": "/install",
              "link": "/api/@warp-drive/ember/install/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@warp-drive/react",
          "link": "/api/@warp-drive/react/",
          "collapsed": true,
          "items": [
            {
              "text": "exports",
              "items": [
                {
                  "text": "WatcherContext",
                  "link": "/api/@warp-drive/react/variables/WatcherContext.md"
                },
                {
                  "text": "ReactiveContext",
                  "link": "/api/@warp-drive/react/functions/ReactiveContext.md"
                },
                {
                  "text": "Request",
                  "link": "/api/@warp-drive/react/functions/Request.md"
                },
                {
                  "text": "StoreProvider",
                  "link": "/api/@warp-drive/react/functions/StoreProvider.md"
                },
                {
                  "text": "Throw",
                  "link": "/api/@warp-drive/react/functions/Throw.md"
                },
                {
                  "text": "useStore",
                  "link": "/api/@warp-drive/react/functions/useStore.md"
                }
              ]
            },
            {
              "text": "/install",
              "link": "/api/@warp-drive/react/install/",
              "collapsed": true,
              "items": []
            }
          ]
        }
      ]
    },
    {
      "text": "Legacy Packages",
      "collapsed": true,
      "items": [
        {
          "text": "@ember-data/active-record",
          "link": "/api/@ember-data/active-record/",
          "collapsed": true,
          "items": [
            {
              "text": "/request",
              "link": "/api/@ember-data/active-record/request/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/adapter",
          "link": "/api/@ember-data/adapter/",
          "collapsed": true,
          "items": [
            {
              "text": "/error",
              "link": "/api/@ember-data/adapter/error/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/index",
              "link": "/api/@ember-data/adapter/index/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/json-api",
              "link": "/api/@ember-data/adapter/json-api/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/rest",
              "link": "/api/@ember-data/adapter/rest/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/graph",
          "link": "/api/@ember-data/graph/"
        },
        {
          "text": "@ember-data/json-api",
          "link": "/api/@ember-data/json-api/",
          "collapsed": true,
          "items": [
            {
              "text": "/index",
              "link": "/api/@ember-data/json-api/index/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/request",
              "link": "/api/@ember-data/json-api/request/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/legacy-compat",
          "link": "/api/@ember-data/legacy-compat/",
          "collapsed": true,
          "items": [
            {
              "text": "exports",
              "items": [
                {
                  "text": "LegacyNetworkHandler",
                  "link": "/api/@ember-data/legacy-compat/variables/LegacyNetworkHandler.md"
                },
                {
                  "text": "adapterFor",
                  "link": "/api/@ember-data/legacy-compat/functions/adapterFor.md"
                },
                {
                  "text": "cleanup",
                  "link": "/api/@ember-data/legacy-compat/functions/cleanup.md"
                },
                {
                  "text": "normalize",
                  "link": "/api/@ember-data/legacy-compat/functions/normalize.md"
                },
                {
                  "text": "pushPayload",
                  "link": "/api/@ember-data/legacy-compat/functions/pushPayload.md"
                },
                {
                  "text": "serializeRecord",
                  "link": "/api/@ember-data/legacy-compat/functions/serializeRecord.md"
                },
                {
                  "text": "serializerFor",
                  "link": "/api/@ember-data/legacy-compat/functions/serializerFor.md"
                }
              ]
            },
            {
              "text": "/builders",
              "link": "/api/@ember-data/legacy-compat/builders/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/utils",
              "link": "/api/@ember-data/legacy-compat/utils/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/model",
          "link": "/api/@ember-data/model/",
          "collapsed": true,
          "items": [
            {
              "text": "/hooks",
              "link": "/api/@ember-data/model/hooks/"
            },
            {
              "text": "/index",
              "link": "/api/@ember-data/model/index/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/migration-support",
              "link": "/api/@ember-data/model/migration-support/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/request",
          "link": "/api/@ember-data/request/",
          "collapsed": true,
          "items": [
            {
              "text": "/fetch",
              "link": "/api/@ember-data/request/fetch/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/index",
              "link": "/api/@ember-data/request/index/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/request-utils",
          "link": "/api/@ember-data/request-utils/",
          "collapsed": true,
          "items": [
            {
              "text": "/deprecation-support",
              "link": "/api/@ember-data/request-utils/deprecation-support/"
            },
            {
              "text": "/handlers",
              "link": "/api/@ember-data/request-utils/handlers/",
              "collapsed": true,
              "items": [
                {
                  "text": "/Handlers",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/AutoCompress",
                      "link": "/api/@ember-data/request-utils/handlers/classes/AutoCompress.md"
                    },
                    {
                      "text": "/Gate",
                      "link": "/api/@ember-data/request-utils/handlers/classes/Gate.md"
                    },
                    {
                      "text": "/MetaDocHandler",
                      "link": "/api/@ember-data/request-utils/handlers/variables/MetaDocHandler.md"
                    }
                  ]
                },
                {
                  "text": "/Constants",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/MAX_URL_LENGTH",
                      "link": "/api/@ember-data/request-utils/handlers/variables/MAX_URL_LENGTH.md"
                    },
                    {
                      "text": "/SupportsRequestStreams",
                      "link": "/api/@ember-data/request-utils/handlers/variables/SupportsRequestStreams.md"
                    },
                    {
                      "text": "/TAB_ASSIGNED",
                      "link": "/api/@ember-data/request-utils/handlers/variables/TAB_ASSIGNED.md"
                    },
                    {
                      "text": "/TAB_ID",
                      "link": "/api/@ember-data/request-utils/handlers/variables/TAB_ID.md"
                    }
                  ]
                },
                {
                  "text": "/Utility Functions",
                  "collapsed": true,
                  "items": [
                    {
                      "text": "/addTraceHeader",
                      "link": "/api/@ember-data/request-utils/handlers/functions/addTraceHeader.md"
                    },
                    {
                      "text": "/assertInvalidUrlLength",
                      "link": "/api/@ember-data/request-utils/handlers/functions/assertInvalidUrlLength.md"
                    }
                  ]
                }
              ]
            },
            {
              "text": "/index",
              "link": "/api/@ember-data/request-utils/index/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/string",
              "link": "/api/@ember-data/request-utils/string/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/rest",
          "link": "/api/@ember-data/rest/",
          "collapsed": true,
          "items": [
            {
              "text": "/request",
              "link": "/api/@ember-data/rest/request/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/serializer",
          "link": "/api/@ember-data/serializer/",
          "collapsed": true,
          "items": [
            {
              "text": "/index",
              "link": "/api/@ember-data/serializer/index/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/json",
              "link": "/api/@ember-data/serializer/json/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/json-api",
              "link": "/api/@ember-data/serializer/json-api/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/rest",
              "link": "/api/@ember-data/serializer/rest/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/transform",
              "link": "/api/@ember-data/serializer/transform/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/store",
          "link": "/api/@ember-data/store/",
          "collapsed": true,
          "items": [
            {
              "text": "/configure",
              "link": "/api/@ember-data/store/configure/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/index",
              "link": "/api/@ember-data/store/index/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/types",
              "link": "/api/@ember-data/store/types/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@ember-data/tracking",
          "link": "/api/@ember-data/tracking/",
          "collapsed": true,
          "items": [
            {
              "text": "/index",
              "link": "/api/@ember-data/tracking/index/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@warp-drive/build-config",
          "link": "/api/@warp-drive/build-config/",
          "collapsed": true,
          "items": [
            {
              "text": "/babel-macros",
              "link": "/api/@warp-drive/build-config/babel-macros/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/canary-features",
              "link": "/api/@warp-drive/build-config/canary-features/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/debugging",
              "link": "/api/@warp-drive/build-config/debugging/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/deprecations",
              "link": "/api/@warp-drive/build-config/deprecations/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/index",
              "link": "/api/@warp-drive/build-config/index/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@warp-drive/core-types",
          "link": "/api/@warp-drive/core-types/",
          "collapsed": true,
          "items": [
            {
              "text": "/cache",
              "link": "/api/@warp-drive/core-types/cache/",
              "collapsed": true,
              "items": [
                {
                  "text": "/aliases",
                  "link": "/api/@warp-drive/core-types/cache/aliases/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/change",
                  "link": "/api/@warp-drive/core-types/cache/change/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/mutations",
                  "link": "/api/@warp-drive/core-types/cache/mutations/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/operations",
                  "link": "/api/@warp-drive/core-types/cache/operations/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/relationship",
                  "link": "/api/@warp-drive/core-types/cache/relationship/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/graph",
              "link": "/api/@warp-drive/core-types/graph/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/identifier",
              "link": "/api/@warp-drive/core-types/identifier/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/index",
              "link": "/api/@warp-drive/core-types/index/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/json",
              "collapsed": true,
              "items": [
                {
                  "text": "/raw",
                  "link": "/api/@warp-drive/core-types/json/raw/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/params",
              "link": "/api/@warp-drive/core-types/params/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/record",
              "link": "/api/@warp-drive/core-types/record/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/request",
              "link": "/api/@warp-drive/core-types/request/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/runtime",
              "link": "/api/@warp-drive/core-types/runtime/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/schema",
              "collapsed": true,
              "items": [
                {
                  "text": "/concepts",
                  "link": "/api/@warp-drive/core-types/schema/concepts/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/fields",
                  "link": "/api/@warp-drive/core-types/schema/fields/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/spec",
              "collapsed": true,
              "items": [
                {
                  "text": "/document",
                  "link": "/api/@warp-drive/core-types/spec/document/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/error",
                  "link": "/api/@warp-drive/core-types/spec/error/",
                  "collapsed": true,
                  "items": []
                },
                {
                  "text": "/json-api-raw",
                  "link": "/api/@warp-drive/core-types/spec/json-api-raw/",
                  "collapsed": true,
                  "items": []
                }
              ]
            },
            {
              "text": "/symbols",
              "link": "/api/@warp-drive/core-types/symbols/",
              "collapsed": true,
              "items": []
            },
            {
              "text": "/utils",
              "link": "/api/@warp-drive/core-types/utils/",
              "collapsed": true,
              "items": []
            }
          ]
        },
        {
          "text": "@warp-drive/schema-record",
          "link": "/api/@warp-drive/schema-record/",
          "collapsed": true,
          "items": []
        }
      ]
    }
  ],
  "socialLinks": [
    {
      "icon": "github",
      "link": "https://github.com/warp-drive-data/warp-drive"
    },
    {
      "icon": "discord",
      "link": "https://discord.gg/PHBbnWJx5S"
    },
    {
      "icon": "bluesky",
      "link": "https://bsky.app/profile/warp-drive.io"
    }
  ],
  "editLink": {
    "pattern": "https://github.com/warp-drive-data/warp-drive/edit/main/:path"
  },
  "search": {
    "provider": "local"
  },
  "outline": {
    "level": 2
  },
  "footer": {
    "message": "Released under the MIT License.",
    "copyright": "Copyright &copy; 2025 Ember.js and Contributors"
  }
}

Page Data

{
  "title": "Runtime API Examples",
  "description": "",
  "frontmatter": {
    "outline": "deep"
  },
  "headers": [],
  "relativePath": "api-examples.md",
  "filePath": "api-examples.md"
}

Page Frontmatter

{
  "outline": "deep"
}

More

Check out the documentation for the full list of runtime APIs.

Released under the MIT License.