graphql-hive/graphql-yoga
graphql-hive/graphql-yoga has 8,539 GitHub stars and 602 forks. Star changes are not measured yet. Last checked 2026-11-06 21:06 UTC. Last push 2026-11-06.
🧘 Rewrite of a fully-featured GraphQL Server with focus on easy setup, performance & great developer experience. The core of Yoga implements WHATWG Fetch API and can run/deploy on any JS environment.
What you can do
- Fully typed with TypeScript
- GraphQL over HTTP spec compliant
- GraphiQL included
- File uploads with GraphQL Multipart Request spec
Measured star growth
- in 24h
- Update delayed
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
GraphQL Yoga
Fully-featured GraphQL Server with focus on easy setup, performance & great developer experience
Go to documentation
Quick start
Install
pnpm add graphql-yoga graphql
Start
Make a schema, create Yoga and start a Node server:
import { createServer } from 'node:http'
import { createSchema, createYoga } from 'graphql-yoga'
const yoga = createYoga({
schema: createSchema({
typeDefs: /* GraphQL */ `
type Query {
hello: String
}
`,
resolvers: {
Query: {
hello: () => 'Hello from Yoga!'
}
}
})
})
const server = createServer(yoga)
server.listen(4000, () => {
console.info('Server is running on http://localhost:4000/graphql')
})
Overview
- Easiest way to run a GraphQL server: Sensible defaults & includes everything you need with minimal setup (we also export a platform/env-agnostic handler so you can build your own wrappers easily).
- Includes Subscriptions: Built-in support for GraphQL subscriptions using Server-Sent Events.
- Compatible: Works with all GraphQL clients (Apollo, Relay, Urql...) and fits seamless in your GraphQL workflow.
- WHATWG Fetch API: the core package depends on WHATWG Fetch API so it can run and deploy on any environment (Serverless, Workers, Deno, Node).
- Easily Extendable: New GraphQL-Yoga support all
envelopplugins.
Features
- Fully typed with TypeScript
- GraphQL over HTTP spec compliant
- GraphiQL included
- File uploads with GraphQL Multipart Request spec
- Subscriptions and realtime capabilities
- Automatic persisted queries
- Built-in parsing and validation caching
- Testing utilities
- Supports ESM
- Runs everywhere, including environments like:
- And more...
Documentation
Our documentation website will help you get started.
Examples
We've made sure developers can quickly start with GraphQL Yoga by providing a comprehensive set of
examples.
See all of them in the examples/ folder.
Comparison
Read more about how GraphQL Yoga compares to other servers in the ecosystem here.
Contributing
If this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.
For this project in particular, to get started on stage/2-failing-test:
- Install Node.js
- Run in your terminal:
npm i -g pnpm@8 && pnpm install && pnpm build - Add tests to
packages/graphql-yoga/__tests__using Jest APIs - Run the tests with
pnpm test
Feel free to open issues and pull requests. We're always welcome support from the community.
Code of Conduct
Help us keep Yoga open and inclusive. Please read and follow our Code of Conduct as adopted from Contributor Covenant.
License
MIT
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,539 starspublic-apis/public-apis
A collective list of free APIs
496,818 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
438,926 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,094 stars