Skip to main content
Alongside the REST API, KiteFrost serves a GraphQL endpoint for the cases where REST is awkward: fetching several related things in one round-trip, and subscribing to real-time events. Start with REST for onboarding and simple writes; reach for GraphQL when your reads become graph-shaped or you need a live stream.

Endpoint

Authentication is identical to REST: send your API key as a Bearer token.
The response is the standard GraphQL envelope. GraphQL validation and execution errors are returned in-band with HTTP 200, in the errors array:
Each error carries an extensions.code that lines up with the REST error codes (for example budget_exceeded, content_policy_violation, invalid_byok_key), plus a request_id for support.

Get the schema

Schema introspection is disabled in production. To discover the schema, fetch the SDL from the authenticated schema endpoint:
It returns the SDL as text/plain, with an ETag (use If-None-Match for conditional requests) and an X-Schema-Pack header naming the edition your key sees. A static copy is also published for each launched product edition so you can run codegen in CI without a live call. There is no separate GraphQL SDK - the SDL is the contract. Run your own codegen against it (for example graphql-codegen for TypeScript or gql for Python) to get fully-typed clients in your stack.

From the SDKs

There is no purpose-built graphql() method on the current per-pack SDKs (kitefrost-game-narrative, kitefrost-ttrpg-gm) yet. Every per-pack client’s shared core transport is a generic HTTP client that reuses your client’s auth and error mapping (AuthError/RateLimited/etc. raise the same as any other call) - use it directly. The attribute name differs by language: client.core.transport in Python, client.core.http in TypeScript.
No automatic retry beyond a one-shot re-auth on a 401 - same as any other SDK call. See SDKs overview for the full error-handling model.

Real-time events

The GraphQL surface offers a subscription for streaming project events as they happen - useful for keeping multiple clients in sync without polling. Streaming delivery is currently in beta; see the SDL for the subscription shape.

Limits

  • Queries are bounded by depth and complexity limits; very deep or very wide documents are rejected with a validation error before execution.
  • Standard per-tier rate limits apply, identical to REST. See Authentication.

When to use GraphQL vs REST