{"repo":"unlight/prisma-nestjs-graphql","free":true,"listed":false,"github":"https://github.com/unlight/prisma-nestjs-graphql","clone":"git clone https://github.com/unlight/prisma-nestjs-graphql.git","description":"Generate object types, inputs, args, etc. from prisma schema file for usage with @nestjs/graphql module","language":"TypeScript","stars":572,"topics":["nestjs","graphql","prisma","prisma-generator","nestjs-graphql","prisma-nestjs-graphql"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"prisma-nestjs-graphql Generate object types, inputs, args, etc. from prisma schema file for usage with @nestjs/graphql module. Features - Generates only necessary imports - Combines zoo of nested/nullable filters - Does not generate resolvers, since it's application specific Install Usage 1. Add new generator section to schema.prisma file 2. Add a configuration file Create prisma/nestgraphql.config.mjs and reference it in your schema: All generator options—including decorators , fields , useInputType , customImport , and graphqlScalars —are defined as structured JavaScript objects in the config file instead of using underscore-delimited keys ( decorate 1 , fields Validator , etc.) directly in the schema. 3. Run prisma generate 4. If your models have Decimal and Json types, you need install: - graphql-type-json - prisma-graphql-type-decimal Or write you own graphql scalar types, read more on docs.nestjs.com. Configuration File Instead of defining all options as flat keys in schema.prisma , you can use a structured JavaScript config file for better readability, validation, and IDE autocompletion. Migration from flatten-style keys Before (underscore-delimited keys in schema.prisma ): After (structured objects in nestgraphql.config.mjs ): Backward compatibility The old flatten-style keys still work if no configFile is specified. Options from the config file take precedence. Generator options output Output folder, if path relative and defined in schema it will be relative to schem","default_branch":null,"files":null,"tree":[],"storefront":"/r/unlight","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/unlight/prisma-nestjs-graphql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}