Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paginate not working in prisma 5 with NestJs #18

Open
btd1337 opened this issue Nov 18, 2023 · 2 comments
Open

Paginate not working in prisma 5 with NestJs #18

btd1337 opened this issue Nov 18, 2023 · 2 comments

Comments

@btd1337
Copy link

btd1337 commented Nov 18, 2023

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
@deptyped
Copy link
Owner

deptyped commented Nov 18, 2023

@btd1337 seems related to #7

@AlexRMU
Copy link

AlexRMU commented Apr 2, 2024

Look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants