enisdenjo / graphql-yoga-nestjs

Nest GraphQL GraphQL Yoga driver
https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nestjs
25 stars 11 forks source link

Does this work with the latest NestJS? #38

Closed synerp closed 1 year ago

synerp commented 1 year ago

Maybe its just me but I tried it out and received the following error: [Nest] 29744 - 10/12/2022, 11:01:43 PM ERROR [ExceptionHandler] Nest can't resolve dependencies of the YogaDriver. Please make sure that the "graphQlFactory" property is available in the current context.

Potential solutions:

charlypoly commented 1 year ago

Hi @synerp,

The GraphQL Yoga driver has been written for Nest 8.4.7 (not tested with 9.x), I'll work on updating it soon.

synerp commented 1 year ago

Thanks!

charlypoly commented 1 year ago

Hi @synerp,

I am currently working on upgrading this package to the latest version of NestJS (v9.x) and Yoga (v3). From what I'm seeing, I'm not even sure that other GraphQL drivers support NestJS (v9.x).

Could you share the version of the NestJS packages that you use?

synerp commented 1 year ago

I am using "@nestjs/apollo": "^10.1.3", and "@nestjs/graphql": "^10.1.3".

charlypoly commented 1 year ago

@nestjs/apollo is maintained by NestJS people, I encourage you to open an issue on their repository: https://github.com/nestjs/graphql/issues/new?assignees=&labels=needs+triage%2Cbug&template=Bug_report.yml

I think that GraphQL drivers have not yet been updated to be compatible with NestJS 9.x.

synerp commented 1 year ago

@charlypoly Hi Charlie, Sorry but I seem to have misunderstood you. In response to you saying that no other drivers support v9, I replied that @nestjs/apollo works fine. I thought you were looking for a working driver for reference.

charlypoly commented 1 year ago

Hi @synerp,

Thank you for confirming this; other users also confirmed that other Nest GraphQL drivers are working as expected with Nest 9. We will continue investigating this issue and keep you updated here!

Tchoupinax commented 1 year ago

Hello, I also met the issue. Can we help you on that? You have to upgrade the module to be compatible with version 9 of Nest.js?

Thanks!

charlypoly commented 1 year ago

Hi @Tchoupinax,

Yeah, we are seeking help on this topic! 👀 The current implementation has some issues with Nest DI that can happen with Nest 8 but are especially blockers for Nest 9.

I can provide more context by mail or other medium on the inner working of the project.

Tchoupinax commented 1 year ago

Hello @charlypoly, I made a MR to upgrade dependancies and make the plugin working with Nest.js v9. It works well with my project (where I want to use this plugin).

synerp commented 1 year ago

I look forward to trying out Yoga v3 with NestJS :)

enisdenjo commented 1 year ago

The latest v0.2.0 now supports NestJS version v9. 🎊

@Tchoupinax @synerp I'd be very thankful if you could try this out!

synerp commented 1 year ago

The latest v0.2.0 now supports NestJS version v9. 🎊

@Tchoupinax @synerp I'd be very thankful if you could try this out!

I tried and got the same error as https://github.com/charlypoly/graphql-yoga-nestjs/issues/52