AlmondTill/G3N API

fillDrafts

query · in the family Reading your records

What it does

Your own wizard drafts, newest first — being made, ready, or failed — one page at a time.

Your wizard drafts, newest first: status filters by drafting | ready | failed (abandoned drafts drop from the list and stay readable one at a time); limit 1..200 (default 50); nextToken the prior page's cursor verbatim (opaque, tenant-bound). A page may be short (the owner/status filter rides per id page) — walk until nextToken is null. Requires authentication (user sessions).

Before you call

A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Reads only — changes nothing. Abandoned drafts drop from the list but stay readable one at a time; a page may come back short, so keep walking until there is no next page.

Arguments

NameTypeRequiredNotes
statusFillDraftStatusnoOne of the values of [FillDraftStatus](/types/FillDraftStatus/).
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

FillDraftPage FillDraftPage! — One page of your wizard drafts, newest first (the house page grammar). A page may be short — the owner and status filters ride per id page; walk until nextToken is null.

This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.

Example request

graphql
query ExampleFillDrafts($status: FillDraftStatus) {
  fillDrafts(status: $status) {
    items {
      id
      sysId
      type
      caption
      status
      parentId
      rootId
      revision
      revisionNum
      createdAt
      updatedAt
      wizardType
      subjectId
      brief
      materialIds
      filled
      questions
      advice
      understood
      turnCount
      summary
      summarizedThroughSeq
      activeTurnId
      activeTurnStartedAt
      failReason
      sfExecutionArn
      startRequestId
      startedAt
      readyAt
      takenAt
      takenRef
      expiresAt
    }
    nextToken
  }
}

Variables:

json
{
  "status": "drafting"
}

Example response

json
{
  "data": {
    "fillDrafts": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-30ff2b9b0000",
          "sysId": "FL-EXMP-0000-000F",
          "type": "FillDraft",
          "caption": "Blue jeans",
          "status": "drafting",
          "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
          "rootId": "01900000-0000-7000-8000-a1295a650000",
          "revision": "01900000-0000-7000-8000-53c6eea90000",
          "revisionNum": 1,
          "createdAt": "2027-01-31T00:00:00.000Z",
          "updatedAt": "2027-01-31T00:00:00.000Z",
          "wizardType": "<wizard type>",
          "subjectId": "01900000-0000-7000-8000-a07924ef0000",
          "brief": "<brief>",
          "materialIds": [
            "01900000-0000-7000-8000-cbd54f800000"
          ],
          "filled": "<filled>",
          "questions": [
            "<questions>"
          ],
          "advice": "<advice>",
          "understood": "<understood>",
          "turnCount": 1,
          "summary": "<summary>",
          "summarizedThroughSeq": 1,
          "activeTurnId": "01900000-0000-7000-8000-14dfd30c0000",
          "activeTurnStartedAt": "2027-01-31T00:00:00.000Z",
          "failReason": "<fail reason>",
          "sfExecutionArn": "<sf execution arn>",
          "startRequestId": "01900000-0000-7000-8000-353fdae00000",
          "startedAt": "2027-01-31T00:00:00.000Z",
          "readyAt": "2027-01-31T00:00:00.000Z",
          "takenAt": "2027-01-31T00:00:00.000Z",
          "takenRef": "<taken ref>",
          "expiresAt": 1
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer