messageThreadFlag Mutation
Description
Flags or unflags every message in a conversation, resolved the same way as the messages query. Takes the state to apply rather than toggling: a thread can be part flagged, and its indicator is true when any message is flagged, so a toggle could never clear it. Returns how many changed.
mutation messageThreadFlag($threadKey: ID!, $orderRef: ID, $flagged: Boolean!) {
messageThreadFlag(
threadKey: $threadKey
orderRef: $orderRef
flagged: $flagged
)
}
Variables
{
"threadKey": "cb41d74edca3adffc6393994",
"orderRef": "61c945d321193ba4a1e052c3",
"flagged": true
}
Response
{
"messageThreadFlag": "example"
}
Arguments
| Name | Type | Description |
|---|---|---|
threadKey | ID! | Key of the conversation, from the messageThreads query. |
orderRef | ID | Order reference of the conversation when it has one. Takes precedence over threadKey. |
flagged | Boolean! | Whether the conversation should end up flagged. |