Skip to content
Jetrepo
Esc
navigateopen⌘Jpreview
On this page

GraphQL

Query generated roots, fields, relations, and connection envelopes.

Each Backend model generates a read-only GraphQL schema. Root names come from Data Type keys.

Access

Use a key with delivery.readPublished or delivery.readPreview, scoped only to the Backend. A Preview Bearer instead applies the session’s live Data Type, locale, and Vocabulary authorization.

Generated roots

  • One record: <typeKey>(id: ID!, locale: String).
  • A connection: <typeKey>_all(first, after, last, before, locale, sort, nearest, filter, search).
  • Records expose _id, visible fields, and jet lifecycle metadata.
  • Components are inline values without _id or jet.
query GetArticle($id: ID!, $locale: String) {
  article(id: $id, locale: $locale) {
    _id
    title
    jet {
      status
      created_at
      updated_at
      published_at
    }
  }
}
{
  "id": "018f-example",
  "locale": "en-US"
}
{
  "data": {
    "article": {
      "_id": "018f-example",
      "title": "Hello Jetrepo",
      "jet": {
        "status": "Published",
        "created_at": "2026-07-01T09:00:00.000Z",
        "updated_at": "2026-07-02T10:30:00.000Z",
        "published_at": "2026-07-02T10:30:00.000Z"
      }
    }
  }
}

Connections use snake-case metadata:

query Articles($after: String) {
  article_all(first: 2, after: $after) {
    items {
      _id
      title
    }
    total_count
    page_info {
      has_next_page
      end_cursor
    }
  }
}

Generated default SDK operations omit Asset roots and reach Assets through fields. This does not define every query a Backend schema may expose.

Errors and limits

Maximum query depth is 12. An unknown locale produces a GraphQL error with extensions.code: "BAD_USER_INPUT" and extensions.http.status: 400. A locale hidden by Preview authorization produces NOT_FOUND with status metadata 404. GraphQL clients may expose the HTTP status differently, so branch on structured extensions rather than message text.

Introspection is disabled in production only.

Was this page helpful?