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": "a23e9ed427a4952e55b2d57b",
"orderRef": "c546df4baab76c267b76cd54"
}

Response​

{
"messageThread": {
"key": "889b52517cec7ce24a08c339",
"orderId": "example",
"orderIncId": 42,
"orderRef": "fa3efac59353cffe761fb250",
"subject": "example",
"participants": [
"example"
],
"lastMessage": {
"_id": "e82d271f59c724040a43eef9",
"created": 1785946674432,
"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": 1788652285771
}
}

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