{"id":13431247,"url":"https://github.com/mercurius-js/mercurius","last_synced_at":"2026-05-13T18:09:19.204Z","repository":{"id":37417401,"uuid":"148332388","full_name":"mercurius-js/mercurius","owner":"mercurius-js","description":"Implement GraphQL servers and gateways with Fastify","archived":false,"fork":false,"pushed_at":"2025-05-07T08:59:34.000Z","size":1496,"stargazers_count":2430,"open_issues_count":64,"forks_count":245,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-05-08T23:45:50.640Z","etag":null,"topics":["fastify","federation","gateway","graphql","hacktoberfest","nodejs"],"latest_commit_sha":null,"homepage":"https://mercurius.dev/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mercurius-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-09-11T14:41:29.000Z","updated_at":"2025-05-07T08:59:38.000Z","dependencies_parsed_at":"2023-12-11T17:28:41.251Z","dependency_job_id":"8f8d357a-09b2-49f6-96f5-ce09b3bf54e0","html_url":"https://github.com/mercurius-js/mercurius","commit_stats":{"total_commits":771,"total_committers":169,"mean_commits":4.562130177514793,"dds":0.6523994811932555,"last_synced_commit":"a45fd77b7529cd763fba367b2f21eb0c583e5fd6"},"previous_names":["mcollina/fastify-gql"],"tags_count":161,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercurius-js%2Fmercurius","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercurius-js%2Fmercurius/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercurius-js%2Fmercurius/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercurius-js%2Fmercurius/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mercurius-js","download_url":"https://codeload.github.com/mercurius-js/mercurius/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166474,"owners_count":21864467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastify","federation","gateway","graphql","hacktoberfest","nodejs"],"created_at":"2024-07-31T02:01:01.635Z","updated_at":"2026-05-13T18:09:19.199Z","avatar_url":"https://github.com/mercurius-js.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS","JavaScript","Servers \u0026 Frameworks","Implementations","graphql"],"sub_categories":["Windows Manager","JavaScript/TypeScript"],"readme":"![Mercurius Logo](https://raw.githubusercontent.com/mercurius-js/graphics/main/mercurius-horizontal.svg)\n\n# mercurius\n\n[![CI workflow](https://github.com/mercurius-js/mercurius/actions/workflows/ci.yml/badge.svg)](https://github.com/mercurius-js/mercurius/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/mercurius.svg?style=flat)](https://www.npmjs.com/package/mercurius)\n[![NPM downloads](https://img.shields.io/npm/dm/mercurius.svg?style=flat)](https://www.npmjs.com/package/mercurius)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)\n\nMercurius is a [**GraphQL**](https://graphql.org/) adapter for [**Fastify**](https://www.fastify.io)\n\nFeatures:\n\n- Caching of query parsing and validation.\n- Automatic loader integration to avoid 1 + N queries.\n- Just-In-Time compiler via [graphql-jit](http://npm.im/graphql-jit).\n- Subscriptions.\n- Federation support via [@mercuriusjs/federation](https://github.com/mercurius-js/mercurius-federation), including Subscriptions.\n- Gateway implementation via [@mercuriusjs/gateway](https://github.com/mercurius-js/mercurius-gateway), including Subscriptions.\n- Batched query support.\n- Customisable persisted queries.\n\n## Docs\n\n- [Install](#install)\n- [Quick Start](#quick-start)\n- [Examples](#examples)\n- [API](docs/api/options.md)\n- [Context](docs/context.md)\n- [Loaders](docs/loaders.md)\n- [Hooks](docs/hooks.md)\n- [Lifecycle](docs/lifecycle.md)\n- [Federation](docs/federation.md)\n- [Subscriptions](docs/subscriptions.md)\n- [Batched Queries](docs/batched-queries.md)\n- [Persisted Queries](docs/persisted-queries.md)\n- [TypeScript Usage](/docs/typescript.md)\n- [HTTP](/docs/http.md)\n- [GraphQL over WebSocket](/docs/graphql-over-websocket.md)\n- [Integrations](docs/integrations/)\n- [Related Plugins](docs/plugins.md)\n- [Security - CSRF Prevention](docs/security/csrf-prevention.md)\n- [Faq](/docs/faq.md)\n- [Contributing](#contributing)\n- [Acknowledgements](#acknowledgements)\n- [License](#license)\n\n## Install\n\n```bash\nnpm i fastify mercurius graphql\n# or\nyarn add fastify mercurius graphql\n```\n\nThe previous name of this module was [fastify-gql](http://npm.im/fastify-gql) (\u003c 6.0.0).\n\n## Quick Start\n\n```js\n'use strict'\n\nconst Fastify = require('fastify')\nconst mercurius = require('mercurius')\n\nconst app = Fastify()\n\nconst schema = `\n  type Query {\n    add(x: Int, y: Int): Int\n  }\n`\n\nconst resolvers = {\n  Query: {\n    add: async (_, { x, y }) =\u003e x + y\n  }\n}\n\napp.register(mercurius, {\n  schema,\n  resolvers\n})\n\napp.get('/', async function (req, reply) {\n  const query = '{ add(x: 2, y: 2) }'\n  return reply.graphql(query)\n})\n\napp.listen({ port: 3000 })\n```\n\n## Examples\n\nCheck [GitHub repo](https://github.com/mercurius-js/mercurius/tree/master/examples) for more examples.\n\n## Contributing\n\nMercurius is an **OPEN Open Source Project**. This means that:\n\n\u003e Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.\n\nSee the [CONTRIBUTING.md](https://github.com/mercurius-js/mercurius/blob/master/CONTRIBUTING.md) file for more details.\n\n## Acknowledgements\n\nThe project is kindly sponsored by:\n\n- [NearForm](https://www.nearform.com)\n- [Platformatic](https://platformatic.dev)\n\nThe Mercurius name was gracefully donated by [Marco Castelluccio](https://github.com/marco-c).\nThe usage of that library was described in https://hacks.mozilla.org/2015/12/web-push-notifications-from-irssi/, and\nyou can find that codebase in https://github.com/marco-c/mercurius.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmercurius-js%2Fmercurius","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmercurius-js%2Fmercurius","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmercurius-js%2Fmercurius/lists"}