diff --git a/apps/api/src/routes/v1/graphql/schema/courses.graphql b/apps/api/src/routes/v1/graphql/schema/courses.graphql index ca496793..cc1696f8 100644 --- a/apps/api/src/routes/v1/graphql/schema/courses.graphql +++ b/apps/api/src/routes/v1/graphql/schema/courses.graphql @@ -1,3 +1,15 @@ +"An object that contains a subset of a course's metadata, for preview purposes." +type CoursePreview { + "The course ID." + id: String! + "The department code that the course belongs to." + department: String! + "The course number of the course." + courseNumber: String! + "The title of the course." + title: String! +} + "An object that represents a course." type Course { "The course ID." @@ -52,6 +64,12 @@ type Course { geText: String! "The list of terms in which this course was offered." terms: [String!]! + "The previews for the instructors that have taught this course in the past." + instructors: [InstructorPreview!]! + "The previews for the courses that are required to take this course." + prerequisites: [CoursePreview!]! + "The previews for the courses that require this course." + dependencies: [CoursePreview!]! } extend type Query { diff --git a/apps/api/src/routes/v1/graphql/schema/instructors.graphql b/apps/api/src/routes/v1/graphql/schema/instructors.graphql index d18005fd..843ad689 100644 --- a/apps/api/src/routes/v1/graphql/schema/instructors.graphql +++ b/apps/api/src/routes/v1/graphql/schema/instructors.graphql @@ -1,3 +1,13 @@ +"An object that contains a subset of an instructor's metadata, for preview purposes." +type InstructorPreview { + "The instructor's UCINetID." + ucinetid: String! + "The full name of the instructor." + name: String! + "The shortened name (or WebSoc name; e.g. ``SHINDLER, M.``) of the instructor." + shortenedName: String! +} + "An object representing an instructor." type Instructor { "The instructor's UCINetID."