You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Mercurius is a flexible and extendible GraphQL adapter for Fastify, a blazing-fast web framework with the least overhead and a powerful plugin architecture.
4
+
url: https://mercurius.dev/
5
+
github: mercurius-js/mercurius
6
+
npm: "mercurius"
7
+
---
8
+
9
+
To run an hello world script with `mercurius`:
10
+
11
+
```bash
12
+
npm install fastify mercurius
13
+
```
14
+
15
+
Then run `node app.js` with this code in `app.js`:
16
+
17
+
```js
18
+
constFastify=require('fastify')
19
+
constmercurius=require('mercurius')
20
+
21
+
constschema=`
22
+
type Query {
23
+
hello(name: String): String!
24
+
}
25
+
`
26
+
27
+
constresolvers= {
28
+
Query: {
29
+
hello:async (_, { name }) =>`hello ${name ||'world'}`
0 commit comments