Fix graphql Queries (#142)
This commit is contained in:
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user