GraphQL Yoga v3 documentation (superseded by v5): GraphQL Yoga provides you a cross-platform GraphQL Server. So you can easily integrate it into any platform besides Node.js.
GraphQL Yoga provides you a cross-platform GraphQL Server. So you can easily integrate it into any
platform besides Node.js.
Cloudflare Workers provides a serverless execution
environment that allows you to create entirely new applications or augment existing ones without
configuring or maintaining infrastructure.
You will want to use the package graphql-yoga which has an agnostic HTTP handler using
Fetch API’s
Request and
Response objects when building
GraphQL powered Cloudflare Workers.
Watch
Episode #48 of graphql.wtf
for a quick introduction to using GraphQL Yoga with Cloudflare Workers, and KV:
You can also check a full example on our GitHub repository
here
Enabling Subscriptions
In order to enable Server Sent Events based subscriptions with Cloudflare Workers, you should add a
compatibility flag in your wrangler configuration file like below;