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

Commit

Permalink
fix(graphql): 🐛 add leading slash to proxy routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ecxyzzy committed Oct 16, 2023
1 parent 220ab2f commit 62853c3
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions apps/api/src/routes/v1/graphql/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ import { geTransform, proxyRestApi } from "./lib";

export const resolvers: ApolloServerOptions<BaseContext>["resolvers"] = {
Query: {
calendar: proxyRestApi("v1/rest/calendar"),
course: proxyRestApi("v1/rest/courses", { pathArg: "courseId" }),
courses: proxyRestApi("v1/rest/courses", { argsTransform: geTransform }),
allCourses: proxyRestApi("v1/rest/courses/all"),
rawGrades: proxyRestApi("v1/rest/grades/raw"),
aggregateGrades: proxyRestApi("v1/rest/grades/aggregate"),
gradesOptions: proxyRestApi("v1/rest/grades/options"),
aggregateByCourse: proxyRestApi("v1/rest/grades/aggregateByCourse", {
calendar: proxyRestApi("/v1/rest/calendar"),
course: proxyRestApi("/v1/rest/courses", { pathArg: "courseId" }),
courses: proxyRestApi("/v1/rest/courses", { argsTransform: geTransform }),
allCourses: proxyRestApi("/v1/rest/courses/all"),
rawGrades: proxyRestApi("/v1/rest/grades/raw"),
aggregateGrades: proxyRestApi("/v1/rest/grades/aggregate"),
gradesOptions: proxyRestApi("/v1/rest/grades/options"),
aggregateByCourse: proxyRestApi("/v1/rest/grades/aggregateByCourse", {
argsTransform: geTransform,
}),
aggregateByOffering: proxyRestApi("v1/rest/grades/aggregateByOffering", {
aggregateByOffering: proxyRestApi("/v1/rest/grades/aggregateByOffering", {
argsTransform: geTransform,
}),
instructor: proxyRestApi("v1/rest/instructors", { pathArg: "ucinetid" }),
instructors: proxyRestApi("v1/rest/instructors"),
allInstructors: proxyRestApi("v1/rest/instructors/all"),
larc: proxyRestApi("v1/rest/larc"),
websoc: proxyRestApi("v1/rest/websoc", { argsTransform: geTransform }),
depts: proxyRestApi("v1/rest/websoc/depts"),
terms: proxyRestApi("v1/rest/websoc/terms"),
week: proxyRestApi("v1/rest/week"),
instructor: proxyRestApi("/v1/rest/instructors", { pathArg: "ucinetid" }),
instructors: proxyRestApi("/v1/rest/instructors"),
allInstructors: proxyRestApi("/v1/rest/instructors/all"),
larc: proxyRestApi("/v1/rest/larc"),
websoc: proxyRestApi("/v1/rest/websoc", { argsTransform: geTransform }),
depts: proxyRestApi("/v1/rest/websoc/depts"),
terms: proxyRestApi("/v1/rest/websoc/terms"),
week: proxyRestApi("/v1/rest/week"),
},
};

0 comments on commit 62853c3

Please sign in to comment.