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": "0829d97676870c224f0bd70d",
"orderRef": "eea4f84f6a1315fd9a4359d9"
}

Response​

{
"messageThread": {
"key": "fe337c2f57ae2b12aa6b78d9",
"orderId": "example",
"orderIncId": 42,
"orderRef": "7e051094c52f18308ad36fb7",
"subject": "example",
"participants": [
"example"
],
"lastMessage": {
"_id": "462e61b71047c8734929ab36",
"created": 1770587642997,
"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": 1745347419801
}
}

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