Skip to content

Commit b7f6f0c

Browse files
Maggie ChenMaggie Chen
authored andcommitted
delete resolvers
1 parent 102e9a3 commit b7f6f0c

File tree

6 files changed

+1
-859
lines changed

6 files changed

+1
-859
lines changed

backend/typescript/graphql/index.ts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ import simpleEntityResolvers from "./resolvers/simpleEntityResolvers";
1515
import simpleEntityType from "./types/simpleEntityType";
1616
import userResolvers from "./resolvers/userResolvers";
1717
import userType from "./types/userType";
18-
import dashboardType from "./types/dashboardType";
19-
import dashboardResolvers from "./resolvers/dashboardResolvers";
20-
import reviewType from "./types/reviewType";
2118

2219
const query = gql`
2320
type Query {
@@ -32,22 +29,12 @@ const mutation = gql`
3229
`;
3330

3431
const executableSchema = makeExecutableSchema({
35-
typeDefs: [
36-
query,
37-
mutation,
38-
authType,
39-
reviewType,
40-
entityType,
41-
simpleEntityType,
42-
userType,
43-
dashboardType,
44-
],
32+
typeDefs: [query, mutation, authType, entityType, simpleEntityType, userType],
4533
resolvers: merge(
4634
authResolvers,
4735
entityResolvers,
4836
simpleEntityResolvers,
4937
userResolvers,
50-
dashboardResolvers,
5138
),
5239
});
5340

@@ -61,12 +48,6 @@ const graphQLMiddlewares = {
6148
entities: authorizedByAllRoles(),
6249
simpleEntity: authorizedByAllRoles(),
6350
simpleEntities: authorizedByAllRoles(),
64-
dashboardById: authorizedByAllRoles(),
65-
applicationsByRole: authorizedByAllRoles(),
66-
applicationsBySecondChoiceRole: authorizedByAllRoles(),
67-
applicationsById: authorizedByAllRoles(),
68-
applicationTable: authorizedByAllRoles(),
69-
secondChoiceRoleApplicationTable: authorizedByAllRoles(),
7051
userById: authorizedByAdmin(),
7152
userByEmail: authorizedByAdmin(),
7253
login: authorizedByAdmin(),
@@ -79,10 +60,6 @@ const graphQLMiddlewares = {
7960
createSimpleEntity: authorizedByAllRoles(),
8061
updateSimpleEntity: authorizedByAllRoles(),
8162
deleteSimpleEntity: authorizedByAllRoles(),
82-
changeRating: authorizedByAllRoles(),
83-
changeSkillCategory: authorizedByAllRoles(),
84-
updateApplications: authorizedByAllRoles(),
85-
modifyFinalComments: authorizedByAllRoles(),
8663
createUser: authorizedByAdmin(),
8764
updateUser: authorizedByAdmin(),
8865
deleteUserById: authorizedByAdmin(),

backend/typescript/graphql/resolvers/authResolvers.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ const authResolvers = {
5656
);
5757
return isAuthorized;
5858
},
59-
isAuthorizedToReview: async (
60-
_parent: undefined,
61-
{
62-
applicationId,
63-
reviewerUserId,
64-
}: { applicationId: number; reviewerUserId: string },
65-
): Promise<boolean> => {
66-
return reviewService.isAuthorizedToReview(applicationId, reviewerUserId);
67-
},
6859
},
6960
Mutation: {
7061
login: async (

backend/typescript/graphql/resolvers/dashboardResolvers.ts

Lines changed: 0 additions & 163 deletions
This file was deleted.

backend/typescript/graphql/types/dashboardType.ts

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)