MessageThread Object
Description
A conversation: every message sharing an order, or failing that a sender. Summarised for a list view — the messages themselves are fetched through the messages query using the thread's orderRef.
Declaration
type MessageThread {
key: ID!
orderId: String
orderIncId: Int
orderRef: ID
subject: String
participants: [String!]!
lastMessage: Message!
messageCount: Int!
unreadCount: Int!
flagged: Boolean!
via: String
updated: Date!
}
Fields
| Name | Type | Description |
|---|---|---|
key | ID! | Identifier of the conversation. The order reference when the thread belongs to an order, the sender's email otherwise, and the message id for a message with neither. |
orderId | String | Order identifier string shared by the messages in this thread, when it is an order conversation. |
orderIncId | Int | Incremental numeric identifier of the order, when it is an order conversation. |
orderRef | ID | Internal database reference to the order, when it is an order conversation. Pass it to the messages query to read the conversation itself. |
subject | String | Subject of the most recent message in the thread. |
participants | [String!]! | Distinct names of everyone who has written in this thread. |
lastMessage | Message! | Most recent message in the thread, used as the list preview. |
messageCount | Int! | Total number of messages in the thread. |
unreadCount | Int! | Number of messages in the thread the current user has not read. |
flagged | Boolean! | Whether any message in the thread is flagged. |
via | String | Channel the most recent message arrived through (e.g., "email", "eshop", "discogs"). |
updated | Date! | Date of the most recent message in the thread, which is what the list is sorted by. |