diff --git a/src/Quiz/quiz.schema.ts b/src/Quiz/quiz.schema.ts index fac0a31..0259531 100644 --- a/src/Quiz/quiz.schema.ts +++ b/src/Quiz/quiz.schema.ts @@ -314,12 +314,14 @@ export class QuizSchema extends PothosSchema { return await this.prisma.quizAttempt.findMany({ ...query, where: { - ...args.filter, - quiz: { - centerMentorId: centerMentor.mentorId, - }, - ...(args.quizId ? [{ quizId: args.quizId }] : []), - ...(args.userId ? [{ quizId: args.userId }] : []), + AND: [ + { + quiz: { + centerMentorId: centerMentor.mentorId, + }, + }, + ...(args.filter ? [args.filter] : []), + ], }, orderBy: { createdAt: 'desc',