graphql-nexus / nexus

Code-First, Type-Safe, GraphQL Schema Construction
https://nexusjs.org
MIT License
3.4k stars 275 forks source link

using nexus with cloudflare workers #1147

Open Mdev303 opened 1 year ago

Mdev303 commented 1 year ago

Hello , is it possible to use nexus with cloudflare workers ? I got a lot of errors when I tried , is there a setup to follow ?

aimproxy commented 11 months ago

While experimenting with this library too, turns out that this library depends relies on Node.JS APIs such as fs and path. https://github.com/graphql-nexus/nexus/blob/main/src/node.ts

Cloudflare Workers do not support these modules, even with nodejs_compat = true. I recommend trying GQTX, which shares similarities with Nexus but is Node.JS free and compatible with Cloudflare Workers. https://github.com/sikanhe/gqtx