Generate NestJS GraphQL object types, inputs, args, and enums from a Prisma schema file. Current stable version is 23.2.1. It integrates with @nestjs/graphql and is released regularly. Key differentiators: generates only necessary imports, combines nested/nullable filters, and avoids generating resolvers (application-specific). It supports a structured JavaScript config file instead of flat schema keys, and provides options for decorators, custom imports, and scalar types. Requires @prisma/generator-helper and identity-type as peer dependencies.
npm install prisma-nestjs-graphqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: add generator to schema.prisma, run prisma generate, and import generated types.
Migrate to configFile approach: create prisma/nestgraphql.config.mjs and move all options there as structured objects.
Use a structured config file as shown in the README.
Use absolute paths or ensure relative path is correct for your project structure.
Use .mjs extension or set 'type': 'module' in package.json.
Run: npm install graphql-type-json prisma-graphql-type-decimal
Ensure output path is correctly specified and configFile points to a valid .mjs file.
Run: npm install identity-type --save-dev
Install prisma-graphql-type-decimal and register in GraphQL module.