{"repo":"MichalLytek/typegraphql-nestjs","free":true,"listed":false,"github":"https://github.com/MichalLytek/typegraphql-nestjs","clone":"git clone https://github.com/MichalLytek/typegraphql-nestjs.git","description":"TypeGraphQL integration with NestJS","language":"TypeScript","stars":147,"topics":["typegraphql","type-graphql","nestjs","nest","graphql"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"TypeGraphQL NestJS Module Basic integration of TypeGraphQL in NestJS. Allows to use TypeGraphQL features while integrating with NestJS modules system and dependency injector. Installation First, you need to instal the typegraphql-nestjs module along with @nestjs/graphql : If you haven't installed it yet, it's time to add type-graphql into the project: How to use? The typegraphql-nestjs package exports TypeGraphQLModule dynamic module, which is based on the official NestJS GraphQLModule . It exposes three static methods: .forRoot() The first one is TypeGraphQLModule.forRoot() which you should call on your root module, just like with the official GraphQLModule . The only difference is that as its argument you can provide typical TypeGraphQL buildSchema options like emitSchemaFile or authChecker apart from the standard GqlModuleOptions from @nestjs/graphql like installSubscriptionHandlers or context : Then, inside the imported modules (like RecipeModule ) you just need to register the resolvers classes in the module providers array: And that's it! 😁 Notice that the resolvers classes are automatically inferred from your submodules providers array, so you don't need to specify resolvers property from TypeGraphQL buildSchema options inside TypeGraphQLModule.forRoot() . .forFeature() In case of need to provide orphanedTypes setting, you should use TypeGraphQLModule.forFeature() . The recommended place for that is in the module where the orphaned type (like SuperRecipe ) belongs: Us","default_branch":null,"files":null,"tree":[],"storefront":"/r/MichalLytek","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/MichalLytek/typegraphql-nestjs/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."}