nestjs-prisma-graphql-crud-gen
v1.0.4
Published
Generate CRUD resolvers from GraphQL schema with NestJS and Prisma
Downloads
1,305
Maintainers
Readme
NestJS Prisma GraphQL CRUD Generater
Generate CRUD resolvers from GraphQL schema with NestJS and Prisma
Getting Started
- Install this package in your project using:
yarn add nestjs-prisma-graphql-crud-gen
- Add the generator to the schema.prisma:
generator custom_generator {
provider = "nestjs-prisma-graphql-crud-gen"
output = "../generated"
}
- Run the generator
npx prisma generate
Output Directory Structure
generated/
├── common
│ ├── enums.ts
│ ├── inputs.ts
│ └── outputs.ts
├── enums
│ └── Language.enum.ts
├── models
│ └── users.models.ts
└── users
├── users.args.ts
├── users.input.ts
├── users.module.ts
├── users.output.ts
├── users.resolver.ts
└── users.service.ts
Sample results here
Sample Project
nestjs-graphql-starter