Mutations
Mutations require authentication in the form of the user's valid GCaccount access token. The access token must be passed in the request header in the form Authorization: Bearer {access token}.
Notification mutations
Create a Notification
Available arguments to send in a mutation:
appIDapplication id as identified in GCaccount (string)actionLinkurl to page where notification can be actioned (string)actionLevelenum list of eitherNoUserAction,Featured, orUserActionRequired(enum)emailemail notification object (email notification object)onlineonline notification object (online notification object)whoDunItobject that defines who or what generated the event (whoDunIt object)
Example mutation to create a Notification with both and online and email component:
mutation{
createNotification(
appID:"651368451sasedf",
actionLink:"https://app.somewhere.ca/89413268416",
actionLevel: "UserActionRequired",
email:{
from:"noreply.somewhere.ca",
to:"user@somewhere.com",
subject:"You really need to action this",
body:"Something that you really neeed to do",
html: False
},
online:{
titleEn: "Something you need to do",
titleFr: "Quelque chose que vous devez faire",
descriptionEn: "You really need to action this as soon as possible",
descriptionFr: "Vous devez vraiment agir dès que possible"
},
whoDunIt:{
teamID: "861a3sdf6815asdf"
}
){
id,
online{
viewed
}
}
}Modify a Notification
Available arguments to send in a mutation:
idunique identifier of the team to modify (int)onlineonline notification object (online notification object)
Example mutation to modify a Notification
mutation{
updateNotification(
id:2,
online:{
viewed: True
}
){
id,
online,
viewed
}
}