For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

GraphQL

A typed API for selecting Data Product fields and receiving nested results.

GraphQL is useful when you want schema discovery, typed field selection, and a query shape that fits frontend clients. It targets the same semantic layer as REST and Semantic SQL.

Endpoint: POST /api/v1/query/semantic/graphql

Headers: Authorization: Bearer $TOKEN, X-User: <user-id>

Response lifecycle

GraphQL returns rows in the same response when the query finishes within ~55 seconds (200 with data). If it is still running, you get 202 with Retry-After and extensions.statementId. Retry the GraphQL request or poll the statement API in Query lifecycle.

Outcome
HTTP
What you do

Query finishes in time

200 with data

Use data. No polling.

Query still running at timeout

202 with Retry-After and extensions.statementId

Retry after the wait, or poll GET /api/v1/query/statement/{id}

Identical query retried

202 (may reuse result)

Same deduplication as async submits.

For queries that routinely run longer than ~55 seconds, use REST or Semantic SQL.

On timeout the response is HTTP 202 with Retry-After: 30 and a body like:

{
  "data": null,
  "extensions": {
    "status": "IN_PROGRESS",
    "statementId": "a3f8c1d2-...",
    "_links": {
      "self": { "href": "/api/v1/query/statement/a3f8c1d2-..." },
      "result": { "href": "/api/v1/query/statement/a3f8c1d2-.../result" }
    }
  }
}

Basic query

GraphQL:

REST equivalent:

Time granularity

REST equivalent:

Filters and ordering

GraphQL filter differences from REST JSON:

  • Numbers are JSON numbers, not strings.

  • Null checks use { set: false } instead of notSet.

  • in and notIn are supported on string, number, and time fields.

  • Time fields have no onTheDate. Filter one calendar day with inDateRange and the same start and end date, or use beforeDate, afterDate, beforeOrOnDate, or afterOrOnDate.

  • @include(if: $var) and @skip(if: $var) work on fields.

Single-day time filter:

GraphQL has no segments[]. Express segment logic in where:

Multiple models

Cross-model rules are covered in Cross-model queries.

Introspection

Next steps

Choose the next guide based on how your GraphQL request behaves:

  • If the response returns 202, follow the Query lifecycle to poll the statement and retrieve its result.

  • If the request needs fields from related models, see Cross-model queries before combining them.

  • If requests are generated or regularly exceed the synchronous wait window, use REST.

Last updated

Was this helpful?