Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
feat(graphql): ✨ add graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
ecxyzzy committed Dec 28, 2023
1 parent d3c26f8 commit a97f16e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions apps/api/src/routes/v1/graphql/schema/courses.graphql
Original file line number Diff line number Diff line change
@@ -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."
Expand Down Expand Up @@ -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 {
Expand Down
10 changes: 10 additions & 0 deletions apps/api/src/routes/v1/graphql/schema/instructors.graphql
Original file line number Diff line number Diff line change
@@ -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."
Expand Down

0 comments on commit a97f16e

Please sign in to comment.