update user query

This commit is contained in:
2024-10-11 17:19:47 +07:00
parent fc32bf2b74
commit 01b8400a7a
2 changed files with 4 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ export class PrismaService extends PrismaClient implements OnModuleInit {
super({ super({
log: [ log: [
{ {
emit: 'event', emit: 'stdout',
level: 'query', level: 'query',
}, },
{ {

View File

@@ -46,6 +46,9 @@ export class UserSchema extends PothosSchema {
return await this.prisma.user.findMany({ return await this.prisma.user.findMany({
...query, ...query,
take: args.take ?? 10, take: args.take ?? 10,
skip: args.skip ?? 0,
orderBy: args.orderBy ?? undefined,
where: args.filter ?? undefined,
}); });
}, },
}), }),