Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: starter code cleanup draft #37

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions backend/typescript/graphql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ import {
} from "../middlewares/auth";
import authResolvers from "./resolvers/authResolvers";
import authType from "./types/authType";
import entityResolvers from "./resolvers/entityResolvers";
import entityType from "./types/entityType";
import simpleEntityResolvers from "./resolvers/simpleEntityResolvers";
import adminResolvers from "./resolvers/adminResolvers";
import simpleEntityType from "./types/simpleEntityType";
import userResolvers from "./resolvers/userResolvers";
import userType from "./types/userType";
import staffType from "./types/staffType";
Expand Down Expand Up @@ -46,9 +42,7 @@ const executableSchema = makeExecutableSchema({
query,
mutation,
authType,
entityType,
residentType,
simpleEntityType,
userType,
taskType,
staffType,
Expand All @@ -57,9 +51,7 @@ const executableSchema = makeExecutableSchema({
resolvers: merge(
scalarResolvers,
authResolvers,
entityResolvers,
residentResolvers,
simpleEntityResolvers,
userResolvers,
taskResolvers,
staffResolver,
Expand All @@ -73,21 +65,11 @@ const authorizedByAdmin = () => isAuthorizedByRole(new Set(["Admin"]));

const graphQLMiddlewares = {
Query: {
entity: authorizedByAllRoles(),
entities: authorizedByAllRoles(),
simpleEntity: authorizedByAllRoles(),
simpleEntities: authorizedByAllRoles(),
userById: authorizedByAdmin(),
userByEmail: authorizedByAdmin(),
users: authorizedByAdmin(),
},
Mutation: {
createEntity: authorizedByAllRoles(),
updateEntity: authorizedByAllRoles(),
deleteEntity: authorizedByAllRoles(),
createSimpleEntity: authorizedByAllRoles(),
updateSimpleEntity: authorizedByAllRoles(),
deleteSimpleEntity: authorizedByAllRoles(),
createUser: authorizedByAdmin(),
updateUser: authorizedByAdmin(),
deleteUserById: authorizedByAdmin(),
Expand Down
132 changes: 0 additions & 132 deletions backend/typescript/graphql/resolvers/entityResolvers.ts

This file was deleted.

63 changes: 0 additions & 63 deletions backend/typescript/graphql/resolvers/simpleEntityResolvers.ts

This file was deleted.

51 changes: 0 additions & 51 deletions backend/typescript/graphql/types/entityType.ts

This file was deleted.

46 changes: 0 additions & 46 deletions backend/typescript/graphql/types/simpleEntityType.ts

This file was deleted.

24 changes: 0 additions & 24 deletions backend/typescript/models/entity.model.ts

This file was deleted.

13 changes: 0 additions & 13 deletions backend/typescript/models/index.ts

This file was deleted.

Loading
Loading