A GraphQL adapter for Fastify that enables building GraphQL servers and gateways with performance optimizations.
Mercurius is a GraphQL adapter for the Fastify web framework that enables developers to build high-performance GraphQL servers, gateways, and federated services. It solves the problem of integrating GraphQL into Fastify applications by providing optimized query execution, subscription support, and federation capabilities out of the box.
Node.js developers using Fastify who need to implement GraphQL APIs, gateways, or federated services with a focus on performance and real-time features.
Developers choose Mercurius for its tight integration with Fastify, performance optimizations like JIT compilation and query caching, and comprehensive features like subscriptions and federation support, making it a robust alternative to other GraphQL server libraries.
Implement GraphQL servers and gateways with Fastify
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses just-in-time compilation via graphql-jit and caches parsed queries, reducing execution time and server load as highlighted in the features list.
Designed specifically for Fastify, leveraging its plugin system and ecosystem, making setup straightforward within Fastify apps without boilerplate code.
Supports subscriptions, federation, and gateway implementation out of the box via separate modules, enabling real-time and distributed architectures.
Integrates data loaders automatically to prevent N+1 query issues, optimizing database access without manual implementation.
Tightly coupled with Fastify; migrating to another framework like Express would require significant code changes and loss of integrated features.
Lacks advanced GraphQL features such as built-in rate limiting or introspection controls, often requiring custom solutions or additional plugins.
While federation is supported via @mercuriusjs/federation, configuration for federated services can be more involved compared to all-in-one solutions like Apollo Federation.