format code
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user