-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async_hooks restricts to only Node.js usage #1697
Comments
We recently hit this problem trying to use GraphQL Modules with Deno. We'd love to help with this if possible. |
@kamilkisiela do you think this is something we can find a solution for? |
I'm having the same problem trying to use it in Cloudflare Workers. |
#2255 but I haven't test it anywhere for leaks |
I've just tested it and it works just fine. https://github.com/Jinsung-L/graphql-modules-on-cloudflare-workers https://graphql-modules-on-cloudflare-workers.jinsung.workers.dev |
I'd like to bump this issue as it's the one thing keeping me from migrating to Deno, which would greatly improve the workflow of working with GraphQL and avoiding a whole list of transpilers and bundlers before I have a workable server. Since there hasn't been many updates with Deno's implementation of the |
Big update, this issue is fixed in |
Right now GraphQL Modules uses a Node.js specific module async_hooks in /packages/graphql-modules/src/application/execution-context.ts, and that restricts the usage of GraphQL Modules to only Node.js, making it harder/impossible to be used in other environments like Deno or Cloudflare workers.
Workaround: In this repo I had to add a no-op for async_hooks to be able to include it in the Cloudflare workers environment
Describe the solution you'd like
Re-factor the current implementation to not require async_hooks
Describe alternatives you've considered
Ship an extra module that doesn't include the async_hooks usage.
The text was updated successfully, but these errors were encountered: