Examples

  • create Calendar#

mutation{
createOrUpdateCalendar(calendarId:"JimsCalId"){
id
}
}
  • Create event#

mutation{
createOrUpdateEvent(
eventId:"JimsMeeting1"
title:"business lunch"
body:"prepare to talk about your numbers"
calendarId:"calid"
startAt:"2022-01-01T11:45:00"
endAt:"2022-01-01T12:45:00"
){
id
}
}
  • Invite others to this meeting#

    note: JackCalId & JhonnieCalId will be created if they do not yes exist
mutation{
inviteToEvent(eventId:"JimsMeeting1", calendarIds:["JackCalId", "JhonnieCalId"]){
id
}
}
  • Jack wants to know what's this meeting about so he'll accept#

mutation{
acceptInvite(eventId:"JimsMeeting1",calendarId:"JackCalId"){
id
}
}
  • Jhonnie wants nothing to do with this so he'll decline#

mutation{
declineInvite(eventId:"JimsMeeting1", calendarId:"JhonnieCalId"){
id
}
}
  • Jill wants to meet up with Jim Jack & Jhonnie but needs to know when they are all available#

mutation{
checkAvailability(fromDate:$startDate, toDate:$endDate, calendarIds:["JillCalId", "JimsCalId", "JackCalId", "JhonnieCalId"]){
from{
formatted
}
to{
formatted
}
}
}
  • Jill wants to know who and when accepted, declined, did not respond to her meeting request#

query{
Event(id:"JillMeetingId"){
attendeeHistory{
action
timeStamp
calendarId
}
}
}
  • Jhonnie left the app lets delete his calendar#

mutation{
deleteCalendar(calendarId:"JhonnieCalId"){
id
}
}
  • As the app owner i'd like to show Jill her events coming up the week ahead#

    note: you can pass dayCount to events_withinDays for a different number of days ( 7 is the default )
query{
Calendar(id:"JillCalId"){
events_withinDays{
id
}
}
}
query{
Calendar(id:"JillCalId"){
events_withinDays((dayCount:10)){
id
}
}
}
  • As the app owner i'd like to overlay two users calendars for the next 10 days#

query{
Calendar(filter:{id_in:["JillCalId","JackCalId"]}){
id
events_withinDays(dayCount:10){
id
}
}
}
  • As the app owner i'd like to overlay all calendars who have events during a period#

query{
Calendar(filter:{
AND:[
{events_some:{startAt_gte:{formatted:"2021-01-01T08:00:00"}}},
{events_some:{startAt_lte:{formatted:"2021-01-10T16:00:00"}}}
]
}){
id
}
}