Mercurius
Reasonable, with limits. 8th of 10 RPC and GraphQL libraries.
Mercurius is the GraphQL server plugin for Fastify. It is fast, actively maintained, and supports GraphQL 17 and @defer. It is a solid pick if you already run Fastify, but GraphQL Yoga or Apollo Server are the broader defaults for new GraphQL work.
Best for: Teams already on Fastify (or NestJS with the Fastify adapter) that want a fast GraphQL server with subscriptions, caching and JIT built in.
Scores
Overall6.9
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is a good, maintained GraphQL server and the natural choice on Fastify, where it would rate about 7. For most new GraphQL projects, GraphQL Yoga does the same job on any runtime with a larger ecosystem, and Apollo Server leads on tooling. It is tied to one framework and its adoption share is flat, so it stays in the middle of the category.
- pkgpulse.com/guides/graphql-yoga-vs-apollo-server-vs-mercurius-graphql-2026: Pick Mercurius on Fastify; Yoga for new projects in general
- the-guild.dev/graphql/yoga-server/docs/comparison: Yoga's comparison of JS GraphQL servers (written by Yoga's makers)
- peers: Yoga and Apollo have far more dependents
GPT-6.2 Sol: 7.7, likely 6.6 to 8.8
Mercurius is a strong pick for a new Fastify 5 GraphQL service, with high query throughput, built-in loaders, and regular releases. GraphQL Yoga is the stronger general-purpose choice when the runtime or HTTP framework is still open, and it has a larger indexed user base. The range reflects limited benchmarking on the current release and uncertainty about how many maintainers can ship it.
- dev.to/v_diachenko/apollo-vs-mercurius-vs-yoga-i-benchmarked-10-node-js-graphql-setups-with-and-without-nestjs-4abg: Fastify with Mercurius led the tested query workloads.
- the-guild.dev/graphql/yoga-server/docs/comparison: Yoga documents support across more runtimes and HTTP frameworks.
- github.com/mercurius-js/mercurius/releases/tag/v16.12.2: The current stable release includes timely security fixes.
- github releasesLastYear, dependents repos, peers GraphQL Yoga: Regular releases and a smaller indexed footprint than Yoga.
Needed by many3.6
How many developers need a tool for this job?
Claude Opus 5.5: 3.5, likely 2.5 to 4.5
Only developers who build a GraphQL server on Fastify need it. That is a niche within the GraphQL part of a category that also covers RPC. The NestJS Fastify adapter widens the audience a little.
- github description: Implement GraphQL servers and gateways with Fastify
- pkgpulse.com/guides/graphql-yoga-vs-apollo-server-vs-mercurius-graphql-2026: Fastify-only; no edge runtime support
GPT-6.2 Sol: 3.7, likely 2.6 to 4.8
GraphQL serves a sizable share of API teams, and Mercurius targets the subset building on Fastify 5. NestJS reaches some of that same audience through its Fastify driver. The surveys measure GraphQL and Fastify separately, so their overlap remains uncertain.
- postman.com/state-of-api/2025: 33% of API survey respondents reported using GraphQL.
- 2025.stateofjs.com/en-US/libraries/back-end-frameworks: Fastify trails Express and NestJS in reported usage.
- github.com/mercurius-js/mercurius/blob/v16.12.2/index.js: The stable plugin declares Fastify 5.x compatibility.
- docs.nestjs.com/graphql/quick-start: NestJS documents a Mercurius driver for Fastify.
Helps a lot7.6
How well does it do the job for those who need it?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has a full feature set: subscriptions, JIT, loaders, caching, persisted queries, @defer and GraphQL 17. It also has TypeScript types and good docs. Independent benchmarks show it leading under load. What holds the score back: it is tied to Fastify, federation is weaker than in Apollo's and The Guild's ecosystems, and it has no schema builder of its own.
- github.com/mercurius-js/mercurius/releases: v16.12.0 adds @defer, QUERY method, GraphQL 17
- dev.to/v_diachenko/i-benchmarked-nestjs-graphql-express-vs-fastify-vs-mercurius-heres-what-actually-won-224m: Mercurius led every NestJS scenario at 50 virtual users
- gitnation.com/contents/graphql-with-mercurius-and-prisma-love-at-first-sight: User talk praises easy learning and docs
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 8.2, likely 7.0 to 9.2
The stable release covers batching, persisted queries, subscriptions, and incremental delivery, with federation available through plugins. An independent benchmark found better query throughput than Apollo Server and Yoga, using older versions and in-memory workloads. Typed examples give coding agents a clear starting point, while schema-specific resolver types take extra setup. An open report about access to subscription variables and limited testing of the latest release leave room for uncertainty.
- github.com/mercurius-js/mercurius: Documents loads, caching, JIT, subscriptions, and federation plugins.
- github.com/mercurius-js/mercurius/releases/tag/v16.12.0: Added @defer and support for GraphQL 17 alongside 16.
- reddit.com/r/graphql/comments/1x5tcjx/apollo_vs_mercurius_vs_yoga_i_benchmarked_10: Benchmark author reports query results, versions, and workload limits.
- github.com/mercurius-js/mercurius/blob/v16.12.2/docs/typescript.md: Shows manual declarations and a separate schema code generator.
- github.com/mercurius-js/mercurius/issues/1196: A user requested access to variables in a subscription hook.
Holds up over time7.1
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It had 8 releases and 70 commits in the last year, the latest two days ago, and it has 177 contributors. It sits inside the Fastify ecosystem, which companies like Platformatic and NearForm back. Version 16 has avoided breaking changes for a long time. Commit volume is modest next to Yoga or Pothos, and its future depends on Fastify's.
- github commitsLastYear: 70 commits, 8 releases in a year
- github latestRelease: v16.12.2 published 2026-11-18
- github.com/mercurius-js/mercurius/releases: Steady minor releases with no breaking changes
GPT-6.2 Sol: 7.2, likely 6.0 to 8.4
Seventy commits and eight GitHub releases in the past year show ongoing maintenance, and GraphQL 17 support landed alongside continued GraphQL 16 support. The project lists NearForm and Platformatic as sponsors, and several contributors shipped changes. Recent tags are concentrated under one maintainer, and some subscription issues have stayed open for over a year. The depth of release coverage and the scale of ongoing funding remain uncertain.
- github commitsLastYear, releasesLastYear, contributors: 70 commits, eight releases, and 177 contributors over the project's lifetime.
- github.com/mercurius-js/mercurius: Credits NearForm and Platformatic as sponsors.
- github.com/mercurius-js/mercurius/releases/tag/v16.12.0: One maintainer cut the release, which included several contributors' changes.
- github.com/mercurius-js/mercurius/releases/tag/v16.12.2: The same maintainer cut the November security release.
- github.com/mercurius-js/mercurius/issues: Older subscription issues remain open.
Used widely4.4
How many use it, and is that growing?
Claude Opus 5.5: 4.5, likely 3.5 to 5.5
It had 1.37M downloads in 4 weeks. The ratio to a year ago is about 4.0, just under the 4.1 median, so it holds its share but is not gaining. Its 341 dependent repos are far below Apollo Server (5,993) and Yoga (10,200), and some downloads come in through @nestjs/mercurius rather than direct choice.
- npm downloadsLast4Weeks: 1,371,674 vs 343,896 a year ago (ratio ~4.0)
- dependents: 341 repos, 99 packages
- peers dependentRepos: Apollo 5,993, Yoga 10,200, TypeGraphQL 7,054
- bluesky posts: Only 1 post, from a maintainer
GPT-6.2 Sol: 4.2, likely 3.0 to 5.4
Four-week npm installs rose from 344,000 to 1.37 million, a 3.99× increase against the catalog's 4.1× baseline. That implies a small loss of relative install share, while Yoga gained ground at 4.74×. Ecosyste.ms found 341 dependent repositories and 99 packages, with the repository count close to Pothos and well below Apollo Server and Yoga. Automated installs and incomplete repository coverage leave the number of direct choices uncertain.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo: 1,371,674 installs versus 343,896 a year earlier.
- medianDownloadsRatio: The catalog-wide growth baseline is 4.1×.
- dependents repos, packages: 341 repositories and 99 packages in the index.
- peers GraphQL Yoga, Apollo Server, Pothos: Yoga and Apollo have much larger indexed footprints, and Pothos is close.
- github stars, bluesky posts: 2,491 stars and one tracked Bluesky post.
Vouched for5.8
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
Production use is documented through NearForm case studies (daily.dev) and conference talks, and NestJS ships an official adapter for it. Independent benchmarks favour it. It has no survey presence and little community discussion, and much of the praise comes from NearForm, a company close to the project.
- nearform.com/blog/improving-graphql-performance-with-mercurius: daily.dev production case study, by a company close to the project
- dev.to/v_diachenko/i-benchmarked-nestjs-graphql-express-vs-fastify-vs-mercurius-heres-what-actually-won-224m: Independent benchmark
- @nestjs/mercurius: NestJS maintains an official Mercurius driver
- hackerNews stories: No HN stories
GPT-6.2 Sol: 6.6, likely 5.4 to 7.8
NestJS maintains a dedicated driver, and separate benchmark authors found good query performance with Mercurius. A Node.js user described it as a practical choice after using Apollo and barebones setups. NearForm's 2022 daily.dev case study adds a production example from a project sponsor. Recent named production evidence and Mercurius-specific satisfaction data are sparse.
- github.com/nestjs/graphql/releases: NestJS continues to maintain its Mercurius driver.
- dev.to/v_diachenko/apollo-vs-mercurius-vs-yoga-i-benchmarked-10-nodejs-graphql-setups-with-and-without-nestjs-4abg: Independent benchmarks found strong throughput on nested queries.
- tomekdev.com/posts/benchmarking-graphql-solutions-in-the-js-ts-landscape: A second benchmark found strong throughput with JIT enabled.
- reddit.com/r/node/comments/1ln9bb4/recommended_nodejs_graphql_backend_framework: A user recommends the Fastify and Mercurius combination from experience.
- nearform.com/insights/improving-graphql-performance-with-mercurius: A sponsor reports daily.dev's production migration in 2022.
Safe6.7
How safe is it to depend on?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
It is MIT licensed, has 12 dependencies and fixes advisories quickly. But 2026 brought several: a depth-limit bypass, two CSRF issues and a high-severity heap exhaustion, the last two fixed this week. There is no Scorecard data, so release hygiene is unverified.
- advisories: 4 total in OSV, 2 in the last 24 months
- github.com/mercurius-js/mercurius/releases: v16.12.2 fixes high-severity heap exhaustion and CSRF via HEAD
- npm dependencies: 12 direct dependencies
- scorecard: No Scorecard data
GPT-6.2 Sol: 6.8, likely 5.6 to 8.0
Mercurius uses the permissive MIT license and has 12 direct dependencies. The maintainer advisory list includes three 2026 issues absent from the bundle, all fixed by 16.12.2. The fixes for the high-severity denial of service and the moderate-severity CSRF issue shipped on the day of public disclosure. The missing OpenSSF Scorecard and unverified npm publishing controls leave uncertainty about supply-chain safeguards.
- npm license, dependencies: MIT license and 12 direct dependencies.
- advisories total, scorecard: The bundle lists four advisories and no Scorecard result.
- github.com/mercurius-js/mercurius/security/advisories: The maintainer list shows seven advisories, five from 2026.
- github.com/mercurius-js/mercurius/security/advisories/GHSA-7hfc-cmrj-f664: The September issue was fixed in 16.10.1.
- github.com/mercurius-js/mercurius/releases/tag/v16.12.2: The November release fixed both issues on disclosure day.
Good
- It runs as a native Fastify plugin, using Fastify's hooks, logging and error handling, so REST and GraphQL can share one app.
- Built-in graphql-jit compilation, a loader for batching, and query caching give strong throughput under load.
- It keeps pace with the GraphQL spec: v16.12 added @defer, the HTTP QUERY method and GraphQL 17 support.
- Security fixes ship quickly in small, non-breaking minor releases.
Bad
- It only works with Fastify, so it does not fit Express, edge runtimes or serverless platforms like Cloudflare Workers.
- Federation is a separate gateway plugin and has a smaller ecosystem than Apollo's or The Guild's tooling.
- Several advisories in 2026 (CSRF, heap exhaustion, depth-limit bypass) show a real attack surface around subscriptions and HTTP handling.
- It has far fewer dependents, tutorials and examples than Apollo Server or Yoga, so AI agents and newcomers have less to draw on.
The numbers
- npm downloads, 4 weeks
- 1.4M ×4.0 in a year
- GitHub stars
- 2.5k
- Commits, 12 months
- 70
- npm version
- 16.12.2 Nov 2026
- Versions, 12 months
- 9
- Advisories, 24 months
- 2 of 4 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (mercurius-js/mercurius), npm (mercurius), OSV and the OpenSSF Scorecard.
RPC and GraphQL libraries
- 8.2tRPC
- 8.0GraphQL Yoga
- 7.9Pothos
- 7.8oRPC
- 7.6GraphQL.js
- 7.5Connect
- 7.2Apollo Server
- 6.9Mercurius
- 5.0TypeGraphQL
- 1.7ts-rest