format code
This commit is contained in:
@@ -170,8 +170,6 @@ export class UserSchema extends PothosSchema {
|
|||||||
}
|
}
|
||||||
let user = ctx.http.me as UserWithChatRooms
|
let user = ctx.http.me as UserWithChatRooms
|
||||||
|
|
||||||
console.log("hahahahahaha")
|
|
||||||
|
|
||||||
if (!user?.name) {
|
if (!user?.name) {
|
||||||
throw new Error('User not found')
|
throw new Error('User not found')
|
||||||
}
|
}
|
||||||
@@ -214,12 +212,10 @@ export class UserSchema extends PothosSchema {
|
|||||||
type: this.user(),
|
type: this.user(),
|
||||||
args: this.builder.generator.findUniqueArgs('User'),
|
args: this.builder.generator.findUniqueArgs('User'),
|
||||||
resolve: async (query, _root, args) => {
|
resolve: async (query, _root, args) => {
|
||||||
const user = await this.prisma.user.findUniqueOrThrow({
|
return await this.prisma.user.findUniqueOrThrow({
|
||||||
...query,
|
...query,
|
||||||
where: args.where,
|
where: args.where,
|
||||||
})
|
})
|
||||||
|
|
||||||
return user;
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
userBySession: t.prismaField({
|
userBySession: t.prismaField({
|
||||||
|
|||||||
Reference in New Issue
Block a user