3.2.0 ā¢ Published 4 months ago
nestjs-prisma-codegen v3.2.0
nestjs-prisma-codegen
npx nestjs-prisma-codegen ResourceName
nestjs-prisma-codegen šš¦
This package takes your resource name and generates all the tedious NestJS types that you'd otherwise write by hand.
Usage š§āāļøš¼
No complicated spells or potions here. In your src/ directory, Just run the script with the required model name.
npx nestjs-prisma-codegen --graphql User
āāā common
ā āāā auth
ā ā āāā auth.decorator.ts
ā ā āāā auth.guard.ts
ā ā āāā util.ts
ā āāā dtos
ā ā āāā common.input.ts
ā āāā prisma
ā ā āāā prisma.module.ts
ā ā āāā prisma.service.ts
ā āāā types
ā āāā index.ts
āāā models
ā āāā users
ā āāā dtos
ā ā āāā create-user.input.ts
ā ā āāā find.args.ts
ā ā āāā order-by.args.ts
ā ā āāā update-user.input.ts
ā ā āāā where.args.ts
ā āāā entity
ā ā āāā user.entity.ts
ā āāā users.module.ts
ā āāā users.resolver.ts
ā āāā users.service.ts
npx nestjs-prisma-codegen --rest User
.
āāā common
ā āāā auth
ā ā āāā auth.decorator.ts
ā ā āāā auth.guard.ts
ā ā āāā util.ts
ā āāā dtos
ā ā āāā common.dto.ts
ā āāā prisma
ā ā āāā prisma.module.ts
ā ā āāā prisma.service.ts
ā āāā types
ā āāā index.ts
āāā models
ā āāā users
ā āāā dtos
ā ā āāā create.dto.ts
ā ā āāā query.dto.ts
ā ā āāā update.dto.ts
ā āāā entity
ā ā āāā user.entity.ts
ā āāā users.controller.ts
ā āāā users.module.ts
npx nestjs-prisma-codegen --complete User
āāā common
ā āāā auth
ā ā āāā auth.decorator.ts
ā ā āāā auth.guard.ts
ā ā āāā util.ts
ā āāā dtos
ā ā āāā common.dto.ts
ā ā āāā common.input.ts
ā āāā prisma
ā ā āāā prisma.module.ts
ā ā āāā prisma.service.ts
ā āāā types
ā āāā index.ts
āāā models
ā āāā users
ā āāā graphql
ā ā āāā dtos
ā ā ā āāā create-user.input.ts
ā ā ā āāā find.args.ts
ā ā ā āāā order-by.args.ts
ā ā ā āāā update-user.input.ts
ā ā ā āāā where.args.ts
ā ā āāā entity
ā ā ā āāā user.entity.ts
ā ā āāā users.resolver.ts
ā ā āāā users.service.ts
ā āāā rest
ā ā āāā dtos
ā ā ā āāā create.dto.ts
ā ā ā āāā query.dto.ts
ā ā ā āāā update.dto.ts
ā ā āāā entity
ā ā ā āāā user.entity.ts
ā ā āāā users.controller.ts
Then you can implement the input types with the help of typescript. Also the custom RestrictProperties type will always keep the nest types in sync with the prisma schema.
Prisma module
For creating the prisma module and service, refer to the documentation https://docs.nestjs.com/recipes/prisma.
3.2.0
4 months ago
3.1.0
4 months ago
3.0.0
6 months ago
2.0.0
7 months ago
1.1.1
9 months ago
1.1.0
9 months ago
1.0.12
9 months ago
1.0.11
9 months ago
1.0.10
9 months ago
1.0.9
9 months ago
1.0.8
9 months ago
1.0.7
9 months ago
1.0.6
9 months ago
1.0.5
9 months ago
1.0.4
9 months ago
1.0.3
9 months ago
1.0.2
9 months ago
1.0.1
9 months ago
1.0.0
9 months ago