Added in 23.10.
You can update your occasion data such as subject, start time, end time, location, and body in any occasion board by using the Update GraphQL query.
Permissions
You must have either one of the below permissions set to Grant by the Administrator based on your preference.
- Edit own events - To update their own occasions (events)
- Edit all events - To update all the occasions (events) in any occasion board.
Basic Steps
- Open an occasion board where you want to update an occasion.
- Identify the occasion ID from the occasion board from the URL of the occasion.
- Ensure that you have the necessary permission to update an occasion granted by the Administrator based on your preference.
- Create a POST request to update an occasion.
Example
We are going to update the occasion data such as the end time, location, and featured guests using the updateOccasion
mutation GraphQL query.
mutation updateOccasion {
updateOccasion(
id: "message:3523"
updateInput: {
occasionData: {
endTime: "2023-07-20T11:00:00Z"
location: "nbas6217ewqyiudsakhjxmnbzydwigh"
featuredGuests: { items: [{ id: "user:8" }, { id: "user:10" }] }
}
}
) {
errors {
__typename
... on OccasionValidationError {
message
key
fields
}
}
result {
id
subject
body
occasionData {
startTime
endTime
liveStreamUrl
location
featuredGuests {
id
login
}
}
}
}
}
Here is the response for the update mutation GraphQL query.
{
"data": {
"updateOccasion": {
"errors": null,
"result": {
"id": "message:3523",
"occasionData": {
"startTime": "2023-07-15T04:00:00.000+05:30",
"endTime": "2023-07-20T04:00:00.000+05:30",
"liveStreamUrl": "https://www.youtube.com/watch?v=jfKfPfyJRdk",
"location": "nbas6217ewqyiudsakhjxmnbzydwigh",
"featuredGuests": [
{
"id": "user:8",
"login": "Urn"
},
{
"id": "user:10",
"login": "Mpensates"
}
]
}
}
}
}
}
ATLAS
Comments