GraphQL Yoga is a fully-featured, simple-to-setup GraphQL server library built on top of Envelop and GraphQL.js. Current stable version is 5.21.1. It provides a batteries-included experience with built-in support for subscriptions, file uploads, CORS, and error masking. Released weekly, it differentiates itself from Apollo Server and express-graphql by being framework-agnostic (works with Node.js, Deno, and Cloudflare Workers) and fully modular via Envelop plugins. It is actively maintained by The Guild and the GraphQL Hive team.
npm install graphql-yogaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a minimal GraphQL Yoga server with a single 'hello' query and listens on port 4000.
Migrate from `context: ({ req }) => ({ user })` to `context: async ({ request }) => ({ user })`.Upgrade graphql to at least 15.2 or 16.x.
Use dynamic import (`import('graphql-yoga')`) or ensure project is set to `"type": "module"`.Remove `useEnvelopPlugins` and pass plugins array to `createYoga({ plugins: [...] })`.Pass a valid GraphQL schema or a typeDefs/resolvers object to createYoga().
Use import statement: `import { createYoga } from 'graphql-yoga'` or switch to dynamic import.Kill the process using the port or change the port number in server.listen().