# mercurius-js/mercurius

Implement GraphQL servers and gateways with Fastify

Repository: https://github.com/mercurius-js/mercurius
Canonical: https://ross.abutalabs.com/products/mercurius
Homepage: https://mercurius.dev/
Language: JavaScript
License: MIT
License Family: permissive
Topics: gateway, graphql, nodejs, fastify, hacktoberfest, federation
Last push: 2026-08-24T16:34:52+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 81, longevity 100
- inputs: {"age_days": 2913, "days_push": 9, "days_rel": 50, "gap_med": 45, "n_releases_24m": 12}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2484, forks 253 (observed 2026-08-28T04:06:55.487521+00:00)

## What it is
Mercurius is a GraphQL adapter for the Fastify web framework for Node.js, providing query parsing/validation caching, JIT execution, subscriptions, and loader-based batching. It also supports federation and gateway composition via companion plugins.

## Use cases
- build a graphql api server in nodejs
- add graphql to an existing fastify app
- set up graphql subscriptions over websockets
- compose a federated graphql gateway from multiple services
- avoid n+1 queries with dataloader-style loaders
- support batched and persisted graphql queries
- optimize graphql execution with jit compilation

## When to choose
- you use Fastify and want a performant, well-integrated GraphQL layer
- you need subscriptions, federation, or gateway composition in Node.js
- you want query caching, batching, and JIT execution out of the box

## When to avoid
- you use Express, Koa, or another non-Fastify framework
- you need a standalone GraphQL server without Fastify
- your stack is not JavaScript/Node.js

## Facets
- artifact type: library
- maturity: stable
- function: graphql, web-framework, middleware, websocket, caching, http-server
- domain: web-development, backend, apis, developer-tools
- platform: cross-platform
- tags: fastify, graphql-server, federation, gateway, subscriptions, jit-compiler, batched-queries, persisted-queries, nodejs, web-server

## Member repositories
- mercurius-js/mercurius (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.487521+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:28:05.338062+00:00, confidence not recorded.
  - readme: https://github.com/mercurius-js/mercurius (fetched 2026-08-28T04:06:55.487521+00:00, sha 07cbeccc7a69)
  - homepage: https://mercurius.dev/ (fetched 2026-08-29T10:10:03.444315+00:00, sha e2b6fe499fad)
  - registry_npm: https://registry.npmjs.org/mercurius (fetched 2026-08-29T10:10:03.453879+00:00, sha 7539f82a735b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
