You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: t.count is not a function
at /Users/mac/www/cysiam/CYSIAM-api/node_modules/prisma-pagination/dist/index.js:1:492
at ClientService.findAll (/Users/mac/www/cysiam/CYSIAM-api/dist/src/modules/client/client.service.js:31:16)
at ClientController.getAllClients (/Users/mac/www/cysiam/CYSIAM-api/dist/src/modules/client/client.controller.js:25:35)
at /Users/mac/www/cysiam/CYSIAM-api/node_modules/@nestjs/core/router/router-execution-context.js:38:29
at async /Users/mac/www/cysiam/CYSIAM-api/node_modules/@nestjs/core/router/router-execution-context.js:46:28
at async /Users/mac/www/cysiam/CYSIAM-api/node_modules/@nestjs/core/router/router-proxy.js:9:17
You provided the entire prisma findMany method to The paginate function arguments. which is incorrect.
The paginate function takes three arguments.
first: only the model. (this.prisma.clients)
second: findMany options. (only one object containing all the options except skip & take) ({ where, orderBy })
third: The pagination option which are ({ perPage: 10, page: 1})
Error
My usage example:
Versions:
Node
: 16.10.0Prisma
: 4.4.0prisma-pagionation
: 0.2.3The text was updated successfully, but these errors were encountered: