This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.gql
105 lines (81 loc) · 2.64 KB
/
schema.gql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
# An instance of a class in a day.
type Course {
# The exact start date and time of the class.
start: DateTime!
# The duration of the class in minutes.
duration: Int!
# The name of the class.
name: String!
# The location of the class.
locations: [CourseLocation!]!
# The staff member teaching the class.
staff: [StaffMember!]!
# The expected end date and time of the class, computed from its start date and duration.
end: DateTime!
}
# The location (usually, room) of a class.
type CourseLocation {
# The human-readable name of the room.
name: String!
}
# The javascript `Date` as string. Type represents date and time as the ISO Date string.
scalar DateTime
# A group of students used to organize classes.
type Group {
# The name of the group.
name: String!
# The identifier of the group, as used internally by Chronos.
id: Int!
# Returns the schedule of the group in the given time range.
schedule(
# The end date, or a week from the start date if no value is provided.
to: DateTime
# The start date, or today if no value is provided.
from: DateTime
): [ScheduleDay!]!
}
type Query {
# Returns the list of groups matching the given name(s), or all groups if no name is provided.
groups(
# The name(s) of the group(s) to return.
name: [String!]
): [Group!]!
# Returns the list of classes the given group will have in the given time range.
classes(
# The end date, or a week from the start date if no value is provided.
to: DateTime
# The start date, or today if no value is provided.
from: DateTime
# The name of the group to return.
name: String!
): [Course!]!
# Returns the current status of the server.
status: ServerStatus!
}
# A day of classes.
type ScheduleDay {
# The list of all classes of the day.
courses: [Course!]!
# The date and time of the start of the first class of the day.
dayStart: DateTime!
# The date and time of the end of the last class of the day.
dayEnd: DateTime!
}
# The current status of the GraphQL server.
type ServerStatus {
# A boolean that indicates if the GraphQL is currently reloading its data.
loading: Boolean!
# The date and time of the last time a update was started.
lastUpdateStartTime: DateTime!
# The date and time of the end of the last update.
lastUpdateEndTime: DateTime!
}
# A member of the staff; usually, a teacher.
type StaffMember {
# The full-name of the member of the staff.
name: String!
}