AlmondTill/G3N API

On this page

consultationTurns

query · in the family Reading your records

What it does

One page of a consultation's transcript, oldest first.

One page of a Consultation's transcript, OLDEST FIRST. The consultation must be yours-in-tenant (a missing/foreign head refuses NOT_FOUND). Requires authentication. read.

What happens

Reads only — changes nothing.

Who may call it

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

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

ConsultationTurnPage ConsultationTurnPage! — One transcript page (the caseMessages page shape — oldest first; nextToken walks forward).

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

query ExampleConsultationTurns($id: ID!, $limit: Int) {
  consultationTurns(id: $id, limit: $limit) {
    items {
      id
      seq
      role
      body
      materialIds
      takenScratchpadId
      createdAt
    }
    nextToken
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "limit": 1
}

Example response

{
  "data": {
    "consultationTurns": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "seq": 1,
          "role": "<role>",
          "body": "Restock before the weekend.",
          "materialIds": [
            "01900000-0000-7000-8000-a36392ca0000"
          ],
          "takenScratchpadId": "01900000-0000-7000-8000-65ec6b4e0000",
          "createdAt": "2027-01-31T00:00:00.000Z"
        }
      ],
      "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