graphql-code-generator-community icon indicating copy to clipboard operation
graphql-code-generator-community copied to clipboard

Feature/add nestjs support for type graphql plugin

Open mahmoudzeyada opened this issue 2 years ago • 4 comments

Description

Presently, the @nestjs/graphql module shares a similar API interface with type-graphql. However, I encountered a scenario where I required the usage of nestjs graphql instead of type-graphql. To accommodate this, I introduced a configuration flag to switch from using type-graphql to @nestjs/graphql. All tests have successfully passed without the inclusion of a new plugin for @nestjs/graphql.given that the @nestjs/graphql implementation heavily relies on the type-graphql library, effectively behaving as a subtype of that library.

no dependency needed to be added

Type of change

  • [x] New feature (non-breaking change which adds functionality)

  • [x] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] type-graphql.spec

Test Environment:

  • OS: Mac OS
  • @graphql-codegen/typescript-type-graphql.:
  • NodeJS: 20

Checklist:

  • [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules

mahmoudzeyada avatar Nov 28 '23 10:11 mahmoudzeyada

⚠️ No Changeset found

Latest commit: 5a40d205b53b35a1c499defdb11dfabe2d860d87

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 28 '23 10:11 changeset-bot[bot]

anyone is even available to have a conversation!!

mahmoudzeyada avatar Dec 14 '23 18:12 mahmoudzeyada

Hi @mahmoudzeyada, there is now a https://www.npmjs.com/package/@graphql-codegen/typescript-nest

bridges-wood avatar Feb 04 '24 16:02 bridges-wood

@bridges-wood Great 😃 but I believe if we had a discussion about it we would go to this result too as i see now it's just copy paste from typegraphql implementation i though to go with the current approach but it seems a duplication as it now so I added this flag but overall thanks

mahmoudzeyada avatar Feb 04 '24 16:02 mahmoudzeyada