Skip to main content

messageThread Query

Description​

One conversation by its key, summarised exactly as it is in the messageThreads list. For reaching a thread directly rather than picking it from the list. Returns null when nothing matches.

query messageThread($threadKey: ID!, $orderRef: ID) {
messageThread(threadKey: $threadKey, orderRef: $orderRef) {
key
orderId
orderIncId
orderRef
subject
participants
lastMessage {
_id
created
subject
message
fromBuyer
flagged
archived
isSystem
content
read
orderId
orderIncId
uri
via
}
messageCount
unreadCount
flagged
via
updated
}
}

Variables​

{
"threadKey": "7e72c66359a7929d6d128166",
"orderRef": "c41fad4b1eaff5ff0a35b4b9"
}

Response​

{
"messageThread": {
"key": "d761b6982586c387fd8130b2",
"orderId": "example",
"orderIncId": 42,
"orderRef": "fb67404e2dc3a698b571bb71",
"subject": "example",
"participants": [
"example"
],
"lastMessage": {
"_id": "0489c063fa6a4993b353c1f6",
"created": 1775393579255,
"subject": "example",
"message": "example",
"fromBuyer": true,
"flagged": true,
"archived": true,
"isSystem": true,
"content": "example",
"read": true,
"orderId": "example",
"orderIncId": 42,
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"via": "example"
},
"messageCount": 42,
"unreadCount": 42,
"flagged": true,
"via": "example",
"updated": 1762921745531
}
}

Arguments​

NameTypeDescription
threadKeyID!Key of the conversation, from the messageThreads query.
orderRefIDOrder reference of the conversation when it has one. Takes precedence over threadKey.

Returns​

MessageThread