diff --git a/src/User/user.schema.ts b/src/User/user.schema.ts index 6841337..ee6b81f 100644 --- a/src/User/user.schema.ts +++ b/src/User/user.schema.ts @@ -170,8 +170,6 @@ export class UserSchema extends PothosSchema { } let user = ctx.http.me as UserWithChatRooms - console.log("hahahahahaha") - if (!user?.name) { throw new Error('User not found') } @@ -214,12 +212,10 @@ export class UserSchema extends PothosSchema { type: this.user(), args: this.builder.generator.findUniqueArgs('User'), resolve: async (query, _root, args) => { - const user = await this.prisma.user.findUniqueOrThrow({ + return await this.prisma.user.findUniqueOrThrow({ ...query, where: args.where, }) - - return user; }, }), userBySession: t.prismaField({