Added in 23.10.
In this guide, you will learn how to create, update, and delete the occasion comment. You will also know the permissions governing the operation of the occasion comment.
Create Occasion Comment
You can create an occasion comment if you have permission granted by your administrator using the GraphQL query.
Permissions
You must have the Comment on events permission set to Grant by your administrator.
Example
To create an occasion comment:
- Open any occasion where you want to make a comment.
- Identify the ID of the occasion from the URL.
- Make the GraphQL request.
Use the below GraphQL mutation to make a comment.
mutation createOccasionReply($createInput: CreateOccasionReplyInput!) {
createOccasionReply(createInput: $createInput) {
result {
id
body
subject
}
errors {
__typename
}
}
}
The parentId
is the occasion ID where you want to make a comment.
{
"createInput": {
"subject": "July ConcertI ",
"body": "I want to know the leading artist of the concert.",
"parentId": "message:81"
}
}
Here is the response to the above request.
{
"data": {
"createOccasionReply": {
"result": {
"id": "message:98",
"body": "I want to know the leading artist of the concert",
"subject": "July Concert"
},
"errors": null
}
}
}
The message ID 98 is the generated ID of an occasion comment.
Update Occasion Comment
You can update an occasion comment using the GraphQL query.
Permissions
You must have either one of the following permissions set to Grant by your administrator to update the occasion comment.
- Edit own event comments – To update your own comment
- Edit all event comments – To update all the comments on any occasion.
Example
Here is the example for the update occasion comment:
- Open the occasion board where you want to update the comment.
- Open the occasion.
- Identify the ID of the comment.
- Make a GraphQL request to update the comment.
mutation updateOccasionReply(
$id: ID!
$updateInput: UpdateOccasionReplyInput!
) {
updateOccasionReply(id: $id, updateInput: $updateInput) {
result {
id
body
subject
}
errors {
__typename
}
}
}
The ID of the comment where you want to update is 98.
{
"id": "message:98",
"updateInput": {
"body": "Provide the details of the leading guitarist."
}
}
Here is the response for the GraphQL query.
{
"data": {
"updateOccasionReply": {
"result": {
"id": "message:98",
"body": "Provide the details of the leading guitarist.",
"subject": "July Concert"
},
"errors": null
}
}
}
Delete an Occasion Comment
You can delete an occasion comment using the GraphQL query when you have the necessary permissions granted to you by the administrator.
Permissions
You must have either one of the following permissions set to Grant by your administrator.
- Delete own event comments – To delete your own event comments
- Delete all event comments – To delete all the event comments in any occasion.
Example
Here is the example for deleting an occasion comment:
- Open the occasion board.
- Open the occasion where you want to delete the occasion comment.
- Identify the ID of the occasion comment from the URL.
- Make a delete GraphQL request.
mutation deleteOccasion {
deleteMessage(id: "message:98") {
errors {
__typename
}
result
}
}
Here is the response to the GraphQL query.
{
"data": {
"deleteMessage": {
"errors": null,
"result": true
}
}
}
ATLAS
Comments