Create Schedule

Create Schedule with empty rotation

mutation {
  createSchedule(input:{
    teamID:"6129ac15518568defa92794c",
    name:"Product Schedule",
    timeZone:"Asia/kolkata",
    rotations:[],
    owner:{
      type:team,
      ID:"6129ac15518568defa92794c"
    }
  }){
    ID,
    name,
    rotations{
      ID,
      name
    },
    timeZone
  }
}

Response:

{
  "data": {
    "createSchedule": {
      "ID": 001,
      "name": "Product Schedule",
      "rotations": [],
      "timeZone": "Asia/kolkata"
    }
  }
}

Create Schedule with Rotation and without Participants Group

mutation {
  createSchedule(input:{
    teamID:"6129ac15518568defa92794c",
    name:"Product Schedule",
    timeZone:"Asia/kolkata",
    rotations:[{
    name:"new daily 24x7",
    participantGroups:[{
      participants:[{
        type:"user",
        ID:"60f12dd3814bef0008c4036e"
      }]
    }],
    startDate:"2023-05-09T00:00:00Z",
    shiftTimeSlot:{
      startHour:1,
      startMin:0,
      duration:1440
    }
    period:daily,
    changeParticipantsFrequency:1,
    changeParticipantsUnit:day
  }],
    owner:{
      type:team,
      ID:"6129ac15518568defa92794c"
    }
  }){
    ID,
    name,
    rotations{
      ID,
      name,
      startDate,
      period,
      changeParticipantsUnit,
      changeParticipantsFrequency
    },
    timeZone
  }
}

Response:

{
        "ID": 12937,
        "name": "Product Schedule",
        "rotations": [
          {
            "ID": 18134,
            "name": "new daily 24x7",
            "startDate": "2023-05-10T00:00:00Z",
            "period": "daily",
            "changeParticipantsUnit": "day",
            "changeParticipantsFrequency": 1
          }
        ],
        "timeZone": "Asia/kolkata"
      }

Create Schedule with Rotation and Participants Group

mutation {
  createSchedule(input:{
    teamID:"6129ac15518568defa92794b",
    name:"Product Schedule",
    timeZone:"Asia/kolkata",
    rotations:[{
      name:"Daily 24x7",
      startDate:"2023-05-09T00:00:00Z",
      period:daily,
      changeParticipantsFrequency:1,
      changeParticipantsUnit:day,
      participantGroups:[{
        participants:[{
          type:"user",
          ID:"60f12dd3814bef0008c4036e"
        }]
      },
      {participants:[{
        type:"user",
	ID:"60f12dd3814bef0008c4036e"
      }]}]
    }],
    owner:{
      type:team,
      ID:"6129ac15518568defa92794b"
    }
  }){
    ID,
    name,
    rotations{
      ID,
      name,
      startDate,
      period,
      changeParticipantsUnit,
      changeParticipantsFrequency,
      participantGroups{
        participants{
          type:
          ID
        }
    }
    },
    timeZone
  }
}

Response:

{
        "ID": 12937,
        "name": "Product Schedule",
        "rotations": [
          {
            "ID": 18134,
            "name": "new daily 24x7",
            "startDate": "2023-05-10T00:00:00Z",
            "period": "daily",
            "changeParticipantsUnit": "day",
            "changeParticipantsFrequency": 1,
            "participantGroups": [
              {
                "participants": [
                  {
                    "type": "60f12dd3814bef0008c4036e"
                  }
                ]
              }
            ]
          }
        ],
        "timeZone": "Asia/kolkata"
      }

Have any questions? Ask the community.

Last updated