update pagination

This commit is contained in:
2024-10-17 19:06:51 +07:00
parent 9326485258
commit 8817f961a8
13 changed files with 45 additions and 15 deletions

View File

@@ -60,7 +60,7 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
resolve: async (query, root, args, ctx, info) => {
return await this.prisma.workshopSubscription.findMany({
...query,
skip: args.skip ?? 0,
skip: args.skip ?? undefined,
take: args.take ?? 10,
orderBy: args.orderBy ?? undefined,
where: args.filter ?? undefined,