generated from deptyped/prisma-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
When using this library with NestJs, this error occurs:
class UsersRepository {
constructor(private readonly prisma: PrismaService) {}
findMany() {
return this.prisma.users.paginate(); // "The property 'paginate' does not exist on type 'UserDelegate'."
}
}
// Prisma instantiation
import pagination from 'prisma-extension-pagination';
@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
async onModuleInit(): Promise<void> {
await this.$connect();
this.$extends(pagination());
}
}
NestJs: 8.4.7
Typescript: 4.7.4
Prisma: 5.2.0
prisma-extension-pagination: 0.5.0
Metadata
Metadata
Assignees
Labels
No labels