# graphql-hive/graphql-yoga

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/graphql-hive-graphql-yoga).**

8,485 stars · 592 forks · TypeScript · mit

## Links

- GitHub: https://github.com/graphql-hive/graphql-yoga
- Homepage: https://the-guild.dev/graphql/yoga-server
- awesome-repositories: https://awesome-repositories.com/repository/graphql-hive-graphql-yoga.md

## Topics

`bun` `deno` `fetch` `graphql` `graphql-server` `javascript` `nodejs` `the-guild` `typescript` `w3c` `whatwg`

## Description

Yoga is a GraphQL server framework and runtime-agnostic HTTP handler used to build and deploy GraphQL APIs. It functions as a toolkit for managing schemas and resolvers, providing a spec-compliant environment for hosting APIs across diverse JavaScript runtimes, including Node.js, Deno, Bun, and serverless cloud environments.

The project distinguishes itself through its ability to act as an Apollo Federation gateway, composing multiple subgraphs into a single unified supergraph. It also serves as a dedicated subscription server, delivering real-time data streaming via both WebSockets and Server-Sent Events over standard HTTP.

The server includes a broad suite of capabilities covering API security, such as query complexity limiting and persisted operation enforcement, as well as performance optimizations like operation result caching and document parsing reuse. It provides a developer toolset featuring an interactive IDE, schema introspection, and mock data generation.

Yoga uses a fetch-based request handling model and provides adapters for integration with web frameworks such as Express, Fastify, Next.js, and NestJS.

## Tags

### Data & Databases

- [Operation Execution](https://awesome-repositories.com/f/data-databases/graphql-integrations/operation-execution.md) — Provides a specialized handler for executing GraphQL queries, mutations, and subscriptions with support for incremental delivery. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/testing))
- [Federated Data Gateways](https://awesome-repositories.com/f/data-databases/federated-data-gateways.md) — Functions as a federation gateway that routes requests across multiple subgraphs using a supergraph schema.
- [AST Caching](https://awesome-repositories.com/f/data-databases/data-caching/persistent-binary-caches/parsed-code-caching/ast-caching.md) — Caches Abstract Syntax Trees (ASTs) of GraphQL documents to avoid redundant parsing and validation. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/parsing-and-validation-caching))
- [Query Result Caching](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching-strategies/query-result-caching.md) — Caches query results to return identical responses for repeating requests and reduce server-side processing. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/response-caching))
- [Query Output Caches](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching-strategies/query-result-caching/method-result-caches/analysis-result-caches/query-output-caches.md) — Stores the final results of GraphQL query operations to reduce database load and improve response times. ([source](https://the-guild.dev/graphql/yoga-server/docs/prepare-for-production))
- [Distributed Event Synchronization](https://awesome-repositories.com/f/data-databases/distributed-event-synchronization.md) — Integrates external datastores like Redis or Kafka to synchronize event streams across multiple server instances. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions))
- [Query Persistence Engines](https://awesome-repositories.com/f/data-databases/query-caching-strategies/query-persistence-engines.md) — Implements query persistence using hashes to minimize network traffic by avoiding the upload of full documents. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/automatic-persisted-queries))

### Web Development

- [GraphQL APIs](https://awesome-repositories.com/f/web-development/graphql-apis.md) — Provides a full-featured framework for hosting and executing GraphQL APIs by connecting schemas to request handlers. ([source](https://the-guild.dev/graphql/yoga-server/docs))
- [Server Implementations](https://awesome-repositories.com/f/web-development/graphql-apis/server-implementations.md) — Provides a comprehensive framework for building GraphQL server endpoints and managing request execution.
- [Federation Engines](https://awesome-repositories.com/f/web-development/graphql-apis/federation-engines.md) — Implements an Apollo Federation gateway and subgraph architecture to compose multiple services into a unified API. ([source](https://the-guild.dev/graphql/yoga-server/docs/comparison))
- [Server Frameworks](https://awesome-repositories.com/f/web-development/graphql-apis/server-frameworks.md) — Provides a full-featured framework for constructing the server-side implementation of GraphQL APIs.
- [GraphQL Execution Engines](https://awesome-repositories.com/f/web-development/graphql-execution-engines.md) — Executes GraphQL operations against any valid schema object independently of the library used to construct it. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/schema))
- [Schema Definitions](https://awesome-repositories.com/f/web-development/graphql-schema-generation/schema-definitions.md) — Supports defining GraphQL types and relationships using both schema-first and code-first approaches. ([source](https://the-guild.dev/graphql/yoga-server/docs))
- [Schema-Agnostic Execution](https://awesome-repositories.com/f/web-development/graphql-schema-generation/schema-engines/schema-agnostic-execution.md) — Executes GraphQL operations against any schema object, regardless of the library used to construct it.
- [GraphQL Subscriptions](https://awesome-repositories.com/f/web-development/graphql-subscriptions.md) — Implements server-side GraphQL subscriptions for real-time data streaming via WebSockets and SSE.
- [Real-Time Data Streaming](https://awesome-repositories.com/f/web-development/real-time-data-streaming.md) — Implements application-level streaming to push live server-side data updates to clients via subscriptions.
- [Environment Runtime Adapters](https://awesome-repositories.com/f/web-development/request-adapters/environment-runtime-adapters.md) — Integrates with any HTTP environment by using adapters to map requests and responses to standard Web API objects. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/z-other-environments))
- [Request Handling](https://awesome-repositories.com/f/web-development/request-handling.md) — Uses standard Web Fetch API request and response objects to ensure compatibility across diverse JS runtimes.
- [Spec-Compliant GraphQL Servers](https://awesome-repositories.com/f/web-development/spec-compliant-graphql-servers.md) — Provides a spec-compliant environment for hosting GraphQL APIs with support for subscriptions and directives. ([source](https://cdn.jsdelivr.net/gh/graphql-hive/graphql-yoga@main/README.md))
- [Web Framework Adapters](https://awesome-repositories.com/f/web-development/web-framework-adapters.md) — Provides adapters to map environment-specific requests to a unified handler for integration with various web frameworks.
- [Cache Invalidation Utilities](https://awesome-repositories.com/f/web-development/data-fetching-caching/cache-invalidation-utilities.md) — Implements mechanisms to clear cached query results automatically via mutations or manual entity targeting. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/response-caching))
- [Message Masking](https://awesome-repositories.com/f/web-development/error-handling/message-masking.md) — Controls whether internal errors from downstream subgraphs are hidden or exposed to the client. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/apollo-federation))
- [Express Integrations](https://awesome-repositories.com/f/web-development/express-integrations.md) — Integrates as middleware within an Express application to manage requests alongside other HTTP routes. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-express))
- [Supergraph Registry Syncing](https://awesome-repositories.com/f/web-development/graphql-apis/federation-engines/supergraph-registry-syncing.md) — Automatically fetches and updates the supergraph from a registry via background polling to keep the schema current. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/apollo-federation))
- [Schema Explorers](https://awesome-repositories.com/f/web-development/graphql-schema-management/schema-explorers.md) — Provides a mechanism for clients to query the server for its schema definition to aid API exploration. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/introspection))
- [Incremental GraphQL Delivery](https://awesome-repositories.com/f/web-development/incremental-graphql-delivery.md) — Allows sending critical results immediately and delivering slower fields in subsequent responses. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/defer-stream))
- [NestJS Integrations](https://awesome-repositories.com/f/web-development/nestjs-integrations.md) — Runs a server within a NestJS application using a dedicated driver for standalone APIs. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nestjs))
- [REST APIs](https://awesome-repositories.com/f/web-development/rest-apis.md) — Exposes GraphQL queries, mutations, and subscriptions as a standard RESTful API. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/sofa-api))
- [Server Bootstrapping](https://awesome-repositories.com/f/web-development/restful-api-clients/node-js-clients/fetch-based-graphql-servers/server-bootstrapping.md) — Provides a streamlined way to bootstrap a runnable GraphQL API environment by combining schemas and resolvers. ([source](https://the-guild.dev/graphql/yoga-server/docs/migration/migration-from-yoga-v1))
- [Web Framework Integrations](https://awesome-repositories.com/f/web-development/web-framework-integrations.md) — Binds the GraphQL handler to existing web servers by mounting it as middleware on specific routes. ([source](https://the-guild.dev/graphql/yoga-server/docs/migration/migration-from-apollo-server))

### DevOps & Infrastructure

- [Cloud Deployment Platforms](https://awesome-repositories.com/f/devops-infrastructure/cloud-deployment-platforms.md) — Deploys across various hosting environments, including serverless functions and platform-as-a-service providers. ([source](https://cdn.jsdelivr.net/gh/graphql-hive/graphql-yoga@main/README.md))
- [Cross-Runtime Deployments](https://awesome-repositories.com/f/devops-infrastructure/cross-runtime-deployments.md) — Enables API deployment across diverse JavaScript environments like Node.js, Deno, and Bun using a standardized fetch-based configuration. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-bun))
- [Deno Runtime Support](https://awesome-repositories.com/f/devops-infrastructure/runtime-agnostic-deployment-tools/deno-runtime-support.md) — Runs a server on the Deno runtime utilizing a platform-agnostic HTTP handler based on the Fetch API. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-deno))
- [Serverless Function Runtimes](https://awesome-repositories.com/f/devops-infrastructure/cloud-infrastructure/cloud-computing-serverless/serverless-execution-environments/serverless-function-runtimes.md) — Integrates the server into managed environments by mapping cloud events to standard web requests. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-aws-lambda))
- [Serverless Deployment](https://awesome-repositories.com/f/devops-infrastructure/serverless-deployment.md) — Enables deployment to event-driven cloud environments using standard web request and response objects. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-cloudflare-workers))

### Networking & Communication

- [Multi-Transport Real-time Layers](https://awesome-repositories.com/f/networking-communication/real-time-event-streams/multi-transport-real-time-layers.md) — Supports both WebSockets and Server-Sent Events to stream real-time data based on client capabilities.
- [Middleware-Based Request Pipelines](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/request-processing-architectures/request-processing/middleware-based-request-pipelines.md) — Processes requests through a modular pipeline of plugins that hook into the HTTP and execution lifecycles.
- [Real-time Data Subscriptions](https://awesome-repositories.com/f/networking-communication/real-time-data-subscriptions.md) — Delivers real-time GraphQL subscription updates using Server-Sent Events over standard HTTP.
- [Real-time Event Streams](https://awesome-repositories.com/f/networking-communication/real-time-event-streams.md) — Streams real-time GraphQL subscription data to clients using the WebSocket protocol. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-uwebsockets))
- [Server-Sent Events](https://awesome-repositories.com/f/networking-communication/server-sent-events.md) — Streams real-time GraphQL subscription data to clients using Server-Sent Events over standard HTTP. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions))

### Programming Languages & Runtimes

- [Universal Server Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/deployment-specific-runtimes/universal-server-runtimes.md) — Implements a platform-agnostic runtime layer that ensures consistent execution across serverless and edge environments. ([source](https://the-guild.dev/graphql/yoga-server/docs/comparison))

### Software Engineering & Architecture

- [Request Validation](https://awesome-repositories.com/f/software-engineering-architecture/request-validation.md) — Ensures incoming requests adhere to HTTP specifications and enforces security rules on request body parameters. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/request-customization))
- [Runtime Agnostic Architectures](https://awesome-repositories.com/f/software-engineering-architecture/runtime-agnostic-architectures.md) — Uses web-standard Fetch APIs to decouple server logic from specific JavaScript runtimes.
- [Event Bus Management](https://awesome-repositories.com/f/software-engineering-architecture/event-bus-management.md) — Provides a built-in event bus with support for type-safe channels to publish and subscribe to event topics. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions))
- [Next.js Integrations](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/framework-specific-integrations/next-js-integrations.md) — Integrates as a custom route handler to serve requests within a Next.js application environment. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nextjs))
- [Custom Middleware Implementations](https://awesome-repositories.com/f/software-engineering-architecture/middleware/custom-middleware-implementations.md) — Allows the integration of custom logic into the request pipeline via global or endpoint-specific middleware. ([source](https://cdn.jsdelivr.net/gh/graphql-hive/graphql-yoga@main/README.md))
- [Plugin-Based Logic Extensions](https://awesome-repositories.com/f/software-engineering-architecture/plugin-based-logic-extensions.md) — Extends server capabilities such as federation and tracing by integrating external middleware into the execution pipeline. ([source](https://the-guild.dev/graphql/yoga-server/docs/migration/migration-from-apollo-server))
- [Introspection Control](https://awesome-repositories.com/f/software-engineering-architecture/schema-metadata-utilities/introspection-utilities/introspection-control.md) — Prevents reverse-engineering of the API schema by blocking introspection queries for unauthorized actors. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/introspection))
- [Hook-Based Plugin Systems](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/plugin-module-systems/modular-plugin-architectures/plugin-based-architectures/hook-based-plugin-systems.md) — Provides hooks into the HTTP and execution lifecycles to allow custom plugins to manipulate requests and responses. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/envelop-plugins))
- [Pipeline Plugins](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/plugin-module-systems/modular-plugin-architectures/plugin-based-architectures/plugin-based-architectures/pipeline-plugins.md) — Integrates external plugins into a functional pipeline to provide capabilities like rate limiting, caching, and monitoring. ([source](https://the-guild.dev/graphql/yoga-server/docs/comparison))
- [Validation Caching](https://awesome-repositories.com/f/software-engineering-architecture/validation-caching.md) — Stores parsed documents and validation outcomes in a shared cache to eliminate redundant processing. ([source](https://the-guild.dev/graphql/yoga-server/docs/migration/migration-from-yoga-v3))

### Part of an Awesome List

- [Query Complexity Analysis](https://awesome-repositories.com/f/awesome-lists/data/query-execution/query-complexity-analysis.md) — Protects the API from resource exhaustion by capping the depth and cost of incoming GraphQL operations. ([source](https://the-guild.dev/graphql/yoga-server/docs/prepare-for-production))
- [Interactive Query Development](https://awesome-repositories.com/f/awesome-lists/data/sql-query-builders/interactive-query-development.md) — Provides an integrated in-browser environment for iteratively writing, validating, and testing GraphQL queries. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/graphiql))
- [Fastify Integrations](https://awesome-repositories.com/f/awesome-lists/devtools/fastify-integrations.md) — Connects to the Fastify framework to leverage its plugin ecosystem and request handling capabilities. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-fastify))
- [Subscription Connection Managers](https://awesome-repositories.com/f/awesome-lists/devtools/websockets-and-real-time/subscription-connection-managers.md) — Supports the configuration of custom servers to manage persistent WebSocket connections for real-time updates. ([source](https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nextjs))

### Development Tools & Productivity

- [Frontend API Mocking](https://awesome-repositories.com/f/development-tools-productivity/frontend-api-mocking.md) — Generates synthetic data based on the GraphQL schema to facilitate frontend development. ([source](https://cdn.jsdelivr.net/gh/graphql-hive/graphql-yoga@main/README.md))
- [GraphQL Integrated Development Environments](https://awesome-repositories.com/f/development-tools-productivity/graphql-integrated-development-environments.md) — Ships an integrated development environment for writing, testing, and documenting GraphQL APIs in the browser.

### Security & Cryptography

- [Persisted Operation Enforcement](https://awesome-repositories.com/f/security-cryptography/authorization-middleware/persisted-operation-enforcement.md) — Prevents the execution of arbitrary GraphQL documents by requiring clients to send hashes of predefined operations. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/persisted-operations))
- [Operation Whitelisting](https://awesome-repositories.com/f/security-cryptography/domain-access-restrictions/operational-restrictions/operation-whitelisting.md) — Limits the server to executing only a predefined set of hashed operations to prevent unauthorized queries. ([source](https://the-guild.dev/graphql/yoga-server/docs/prepare-for-production))
- [Error Handling Security](https://awesome-repositories.com/f/security-cryptography/error-handling-security.md) — Hides unexpected server errors from clients to prevent the leakage of internal system details. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/error-masking))
- [GraphQL Security](https://awesome-repositories.com/f/security-cryptography/graphql-security.md) — Protects APIs using complexity and depth analysis, internal error masking, and persisted operation enforcement.

### System Administration & Monitoring

- [Distributed Tracing](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/distributed-tracing-execution-analysis/distributed-tracing.md) — Injects metrics into requests to enable distributed tracing across a federated architecture. ([source](https://the-guild.dev/graphql/yoga-server/docs/features/apollo-federation))
