clayrisser / nestjs-crud-prisma Goto Github PK
View Code? Open in Web Editor NEWcrud for restful apis built with nestjs and prisma
License: MIT License
crud for restful apis built with nestjs and prisma
License: MIT License
As per their docs, the new naming convention for table names use PascalCase. This library, on the other hand, uses camelCase as per:
nestjs-crud-prisma/src/prismaCrudService.ts
Lines 55 to 56 in 77514a4
This causes the whole library to break. Would it be possible to either use PascalCase instead or, at the very least, make the table name configurable? (maybe have a passed in options
parameter or something?)
Prisma supports upserting. I'm not sure which REST endpoint would be responsible for upserting but it could be super useful.
I'm getting this error requesting a single entity, /users/1
for example.
[Nest] 47207 - 06/20/2021, 6:27:47 AM [ExceptionsHandler] _this6.client.findOne is not a function +17556ms
TypeError: _this6.client.findOne is not a function
at /Users/sebas/Sites/ponty.app/node_modules/nestjs-crud-prisma/src/prismaCrudService.ts:389:24
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/sebas/Sites/ponty.app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/Users/sebas/Sites/ponty.app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at /Users/sebas/Sites/ponty.app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
at new Promise (<anonymous>)
at /Users/sebas/Sites/ponty.app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
at UsersService.getOne (/Users/sebas/Sites/ponty.app/node_modules/nestjs-crud-prisma/src/prismaCrudService.ts:387:46)
at UsersController.getOneBase (/Users/sebas/Sites/ponty.app/node_modules/@nestjsx/crud/src/crud/crud-routes.factory.ts:211:27)
at /Users/sebas/Sites/ponty.app/node_modules/@nestjs/core/router/router-execution-context.js:38:29
On the master
branch the PrismaCrudService
is using the findUnique
method but in the npm package it's using findOne
.
The following type of query needs to be supported.
?s={"name": {"$or": {"$isnull": true, "$eq": "Superman"}}}
Is this still work for latest nest + nestjsx crud ?
I think filter
, or
and search
cannot be used with eachother in the same query. I just need to make sure this is correctly enforced.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.