Fix graphql Queries (#142)

This commit is contained in:
Charles Bochet
2023-05-26 08:33:33 +02:00
committed by GitHub
parent 17f5cf1766
commit 112aa3720b
19 changed files with 93 additions and 102 deletions

View File

@ -4,16 +4,16 @@ import { PrismaService } from 'src/database/prisma.service';
@Injectable()
export class PersonRepository {
constructor(private prisma: PrismaService) {}
constructor(private prisma: PrismaService) {}
async findMany(params: {
skip?: number;
take?: number;
cursor?: Prisma.PersonWhereUniqueInput;
where?: Prisma.PersonWhereInput;
orderBy?: Prisma.PersonOrderByWithRelationInput;
}): Promise<Person[]> {
const { skip, take, cursor, where, orderBy } = params;
return this.prisma.person.findMany({ skip, take, cursor, where, orderBy });
}
async findMany(params: {
skip?: number;
take?: number;
cursor?: Prisma.PersonWhereUniqueInput;
where?: Prisma.PersonWhereInput;
orderBy?: Prisma.PersonOrderByWithRelationInput;
}): Promise<Person[]> {
const { skip, take, cursor, where, orderBy } = params;
return this.prisma.person.findMany({ skip, take, cursor, where, orderBy });
}
}