AlmondTill/G3N API

On this page

myMessages

query · in the family Your own session

What it does

Your inbox — messages to you and to your teams, newest first. Unread ones have no read mark yet.

Your merged inbox. limit defaults 50, clamps at 100. Requires authentication.

Who may call it

Capability area: Your own session — What every signed-in person may do for themselves — their session, their profile and their own work.

Arguments

NameTypeRequiredNotes
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

MessageRefPage MessageRefPage! — One page of the merged inbox walk.

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 ExampleMyMessages($limit: Int) {
  myMessages(limit: $limit) {
    items {
      id
      toKind
      toId
      fromKind
      fromUserId
      body
      targetType
      targetId
      createdAt
      readAt
    }
    nextToken
  }
}

Variables:

{
  "limit": 1
}

Example response

{
  "data": {
    "myMessages": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "toKind": "USER",
          "toId": "01900000-0000-7000-8000-4dc937890000",
          "fromKind": "USER",
          "fromUserId": "01900000-0000-7000-8000-f626b68f0000",
          "body": "Restock before the weekend.",
          "targetType": "<target type>",
          "targetId": "01900000-0000-7000-8000-446adfd50000",
          "createdAt": "2027-01-31T00:00:00.000Z",
          "readAt": "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