diff --git a/package-lock.json b/package-lock.json index 100ba28..f7e8f28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "quinnjr.tech", - "version": "1.8.0", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "quinnjr.tech", - "version": "1.8.0", + "version": "1.9.0", "hasInstallScript": true, "dependencies": { "argon2": "^0.31.0", diff --git a/server/articles/articles.resolver.ts b/server/articles/articles.resolver.ts index 13eed51..02d9080 100644 --- a/server/articles/articles.resolver.ts +++ b/server/articles/articles.resolver.ts @@ -24,7 +24,7 @@ import { User } from '../../graphql/user/user.model'; @Resolver((of: any) => Article) export class ArticlesResolver { - constructor(/*/*private readonly $databaseService: DatabaseService*/*/) {} + constructor(/*/*private readonly $databaseService: DatabaseService*/) {} @ResolveField('author', (returns) => User) public async getAuthor(@Parent() article: Article): Promise { diff --git a/server/database/database.service.ts b/server/database/database.service.ts index 618b9c2..5ba6f80 100644 --- a/server/database/database.service.ts +++ b/server/database/database.service.ts @@ -4,11 +4,11 @@ import { OnModuleInit, OnModuleDestroy } from '@nestjs/common'; -import { PrismaClient } from '@prisma/client'; +//import { PrismaClient } from '@prisma/client'; @Injectable() export class DatabaseService - extends PrismaClient + // extends PrismaClient implements OnModuleDestroy, OnModuleInit { public async onModuleInit() { @@ -16,6 +16,6 @@ export class DatabaseService } public async onModuleDestroy() { - await this.$disconnect(); + // await this.$disconnect(); } } diff --git a/server/users/users.resolver.ts b/server/users/users.resolver.ts index d6cbf20..ead7079 100644 --- a/server/users/users.resolver.ts +++ b/server/users/users.resolver.ts @@ -15,69 +15,75 @@ export class UsersResolver { constructor(/*private readonly $databaseService: DatabaseService*/) {} @Query((returns) => User, { name: 'user' }) - public async getUser(@Args('email') email: string): Promise { - const user = await this.$databaseService.user.findUnique({ - where: { - email - } - }); + public async getUser(@Args('email') email: string): Promise { + // const user = await this.$databaseService.user.findUnique({ + // where: { + // email + // } + // }); - if (!user) { - throw new Error('No user was found'); - } else { - return user; - } + // if (!user) { + // throw new Error('No user was found'); + // } else { + // return user; + // } + return null; } @ResolveField('articles', (returns) => [Article]) - public async getArticles(@Parent() user: User): Promise { + public async getArticles(@Parent() user: User): Promise { const { id } = user; - return this.$databaseService.article.findMany({ - where: { - authorId: id - } - }); + // return this.$databaseService.article.findMany({ + // where: { + // authorId: id + // } + // }); + return null; } @ResolveField('certifications', (returns) => [Certification]) public async getCertifications( @Parent() user: User - ): Promise { + ): Promise { const { id } = user; - return this.$databaseService.certification.findMany({ - where: { - userId: id - } - }); + // return this.$databaseService.certification.findMany({ + // where: { + // userId: id + // } + // }); + return null; } @ResolveField('educations', (returns) => [Education]) - public async getEducations(@Parent() user: User): Promise { + public async getEducations(@Parent() user: User): Promise { const { id } = user; - return this.$databaseService.education.findMany({ - where: { - userId: id - } - }); + // return this.$databaseService.education.findMany({ + // where: { + // userId: id + // } + // }); + return null; } @ResolveField('experiences', (returns) => [Experience]) - public async getExperiences(@Parent() user: User): Promise { + public async getExperiences(@Parent() user: User): Promise { const { id } = user; - return this.$databaseService.experience.findMany({ - where: { - userId: id - } - }); + // return this.$databaseService.experience.findMany({ + // where: { + // userId: id + // } + // }); + return null; } @ResolveField('projects', (returns) => [Project]) - public async getProjects(@Parent() user: User): Promise { + public async getProjects(@Parent() user: User): Promise { const { id } = user; - return this.$databaseService.project.findMany({ - where: { - userId: id - } - }); + // return this.$databaseService.project.findMany({ + // where: { + // userId: id + // } + // }); + return null; } }