Closed yusufkandemir closed 1 year ago
@yusufkandemir - Hey Yusuf. Fancy meeting you here! :grin:
Is this why, when I tried to migrate (my Fastify/ NestJS app) to Yoga last week, I wasn't getting anything back from the API? Shouldn't there be some sort of test for this? :smiley:
Scott
Hey Scott, same 😁
I was experiencing the same behavior, so most probably yes. I tried this fix and it worked fine. Related documentation and examples make sense, so it seems it's the correct fix to apply here.
There are some tests in place, I even tried adding a GraphiQL-specific test, but interestingly, they passed with and without the fix. I tried upgrading Fastify in this repo to v4, but it didn't make a difference. So, the race condition might become obvious only in real environments such as in a browser where there is extra overhead.
Welp. If this gets merged, I'll try again to migrate.
Scott
@charlypoly - Any chance to get this merged and released soon?
Scott
Hey there, thanks for PR-ing this! Can you please fix the linting issues? I'll merge then ASAP.
thank you @yusufkandemir ! We would love to thank you publicly, if you can share your Twitter/LinkedIn profile (also in private if you prefer) ?
Btw, this fixed my problem. I can now run Yoga instead of Mercurius with NestJS and Fastify. Awesome! Thanks everyone! :+1: :100: :tada:
Scott
@Urigo you are welcome, and thanks! https://www.linkedin.com/in/yusuf-kandemir/
Discovered thanks to #78
See https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-fastify#example https://www.fastify.io/docs/latest/Reference/Routes/#async-await