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.
Before you call
A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).
Capability area: Your own session — What every signed-in person may do for themselves — their session, their profile and their own work.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The 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
graphql
query ExampleMyMessages($limit: Int) {
myMessages(limit: $limit) {
items {
id
toKind
toId
fromKind
fromUserId
body
targetType
targetId
createdAt
readAt
}
nextToken
}
}Variables:
json
{
"limit": 1
}Example response
json
{
"data": {
"myMessages": {
"items": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"toKind": "USER",
"toId": "01900000-0000-7000-8000-41f596440000",
"fromKind": "USER",
"fromUserId": "01900000-0000-7000-8000-e7f2c3020000",
"body": "Restock before the weekend.",
"targetType": "<target type>",
"targetId": "01900000-0000-7000-8000-8b67f1680000",
"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
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)