Skip to content
Snippets Groups Projects
amendLesson.graphql 3.84 KiB
Newer Older
query gqlSubjects {
  amendableSubjects: subjects {
    id
    name
    colourFg
    colourBg
  }
}

query gqlPersons {
  amendableTeachers: persons {
    id
    fullName
  }
}

Hangzhi Yu's avatar
Hangzhi Yu committed
query gqlTeachers {
  amendableTeachers: teachers {
    id
    fullName
  }
}

query gqlRooms {
  amendableRooms: rooms {
    id
    name
Hangzhi Yu's avatar
Hangzhi Yu committed
    shortName
query gqlGroups {
  groups: timetableGroups {
Hangzhi Yu's avatar
Hangzhi Yu committed
mutation createAmendLessons($input: [BatchCreateLessonEventInput]!) {
  createAmendLessons(input: $input) {
    items: lessonEvents {
      amends {
        id
      }
      datetimeStart
      datetimeEnd
      subject {
        id
      }
      teachers {
        id
      }
      groups {
        id
      }
      rooms {
        id
      }
Hangzhi Yu's avatar
Hangzhi Yu committed
mutation patchAmendLessons($input: [BatchPatchLessonEventInput]!) {
  patchAmendLessons(input: $input) {
    items: lessonEvents {
mutation createOrUpdateSubstitutions($input: [SubstitutionInputType]!) {
  createOrUpdateSubstitutions(input: $input) {
    items: substitutions {
      subject {
        id
        shortName
        name
        colourFg
        colourBg
Hangzhi Yu's avatar
Hangzhi Yu committed
        teachers {
          id
          shortName
          fullName
        }
      }
      teachers {
        id
        shortName
        fullName
      }
      groups {
        id
      }
      rooms {
        id
        shortName
        name
      }
      course {
        id
        subject {
          id
          shortName
          name
          colourFg
          colourBg
Hangzhi Yu's avatar
Hangzhi Yu committed
          teachers {
            id
            shortName
            fullName
          }
      amends {
        id
        teachers {
          id
          shortName
          fullName
        }
        subject {
          id
          shortName
          name
          colourFg
          colourBg
Hangzhi Yu's avatar
Hangzhi Yu committed
          teachers {
            id
            shortName
            fullName
          }
        rooms {
          id
          shortName
          name
        }
        course {
          id
          name
        }
      }
      datetimeStart
      datetimeEnd
      cancelled
      comment
    }
  }
}

Hangzhi Yu's avatar
Hangzhi Yu committed
mutation deleteAmendLessons($ids: [ID]!) {
  deleteAmendLessons(ids: $ids) {
Hangzhi Yu's avatar
Hangzhi Yu committed
    deletionCount
query amendedLessonsFromAbsences(
  $objId: ID
  $dateStart: Date!
  $dateEnd: Date!
  $incomplete: Boolean
Hangzhi Yu's avatar
Hangzhi Yu committed
  $teacher: ID
) {
  items: amendedLessonsFromAbsences(
    objId: $objId
    dateStart: $dateStart
    dateEnd: $dateEnd
    incomplete: $incomplete
Hangzhi Yu's avatar
Hangzhi Yu committed
    teacher: $teacher
    subject {
      id
      shortName
      name
      colourFg
      colourBg
Hangzhi Yu's avatar
Hangzhi Yu committed
      teachers {
        id
        shortName
        fullName
      }
    }
    teachers {
      id
      shortName
      fullName
    }
    groups {
      id
    }
    course {
      id
      subject {
        id
        shortName
        name
        colourFg
        colourBg
Hangzhi Yu's avatar
Hangzhi Yu committed
        teachers {
          id
          shortName
          fullName
        }
      shortName
      name
    amends {
      id
      teachers {
        id
        shortName
        fullName
      }
      subject {
        id
        shortName
        name
        colourFg
        colourBg
Hangzhi Yu's avatar
Hangzhi Yu committed
        teachers {
          id
          shortName
          fullName
        }
      rooms {
        id
        shortName
        name
      }
Hangzhi Yu's avatar
Hangzhi Yu committed
      cancelled
      comment
    }
    datetimeStart
    datetimeEnd
    cancelled
    comment
  }
}