mutation createApplication(
  $shiftId: UUID!
  $staffId: UUID!
  $status: ApplicationStatus!
  $checkInTime: Timestamp
  $checkOutTime: Timestamp
  $origin: ApplicationOrigin!
  $roleId: UUID!
) @auth(level: USER) {
  application_insert(
    data: {
      shiftId: $shiftId
      staffId: $staffId
      status: $status
      checkInTime: $checkInTime
      checkOutTime: $checkOutTime
      origin: $origin
      roleId: $roleId
    }
  ) 
}

mutation updateApplicationStatus(
  $id: UUID!
  $shiftId: UUID
  $staffId: UUID
  $status: ApplicationStatus
  $checkInTime: Timestamp
  $checkOutTime: Timestamp
  $roleId: UUID
) @auth(level: USER) {
  application_update(
    id: $id
    data: {
      shiftId: $shiftId
      staffId: $staffId
      status: $status
      checkInTime: $checkInTime
      checkOutTime: $checkOutTime
      roleId: $roleId
    }
  ) 
}

mutation deleteApplication($id: UUID!) @auth(level: USER) {
  application_delete(id: $id) 
}
