copyright | link | is |
---|---|---|
Copyright IBM Corp. 2018 |
remove-a-reaction |
published |
The removeReaction mutation allows the API caller to remove a reaction from a message. The mutation accepts a Message ID (targetId) and a reaction as arguments, and makes the request on behalf of the caller, removing the specified reaction from the message. The result will reflect the current count of users that reacted with the same reaction (string/emoji), and viewerHasReacted as to whether the caller has reacted (false).
type MutationRoot {
...
removeReaction(input: RemoveReactionInput!): RemoveReactionMutation
}
type Reaction {
reaction: String!
count: Int
viewerHasReacted: Boolean!
}
type RemoveReactionMutation {
reaction: Reaction!
}
type RemoveReactionInput {
targetId: String!
reaction: String!
}
Method: POST
URL: https://api.watsonwork.ibm.com/graphql
Headers: 'Content-Type: application/graphql' , 'x-graphql-view: PUBLIC'
Body:
{
mutation {
removeReaction(input: {targetId: "5a209f74e4b0faa757ac1afd", reaction: ":-)"}) {
reaction {
reaction
count
viewerHasReacted
}
}
}
{
"data": {
"removeReaction": {
"reaction": {
"reaction": ":-)",
"count": 0,
"viewerHasReacted": false
}
}
}
}