Skip to main content
@defer and @stream let a client receive an initial response immediately and the remaining data in later incremental payloads, over a streaming transport.
execute_incremental() returns an async iterator of JSON-shaped payloads: the initial { "data": ..., "hasNext": true }, followed by { "incremental": [{ "data"|"items": ..., "path": [...] }], "hasNext": ... }, ending with hasNext: false.
  • @defer applies to fragment spreads and inline fragments; @defer(if: false) resolves the fragment inline with no extra payload.
  • @stream(initialCount: n) applies to list fields and is validated to reject non-list fields.
Incremental delivery requires a streaming transport. Over a non-streaming transport, call execute() instead — it ignores the directives and returns one complete result. The HTTP handler makes this choice automatically based on the Accept header.