Skip to content

Commit 27599f3

Browse files
committed
Upgrade fastify to v4
1 parent a0cef9d commit 27599f3

18 files changed

Lines changed: 44 additions & 44 deletions

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ app.register(mercuriusValidation, {
117117
}
118118
})
119119

120-
app.listen(3000)
120+
app.listen({ port: 3000 })
121121
```
122122

123123
### Validation with the GraphQL `@constraint` directive
@@ -187,7 +187,7 @@ app.register(mercurius, {
187187
})
188188
app.register(mercuriusValidation)
189189

190-
app.listen(3000)
190+
app.listen({ port: 3000 })
191191
```
192192

193193
## Benchmarks
@@ -197,7 +197,7 @@ app.listen(3000)
197197
Last run: `2021-09-27`
198198

199199
```text
200-
Running 10s test @ http://localhost:3000/graphql
200+
Running 10s test @ http://127.0.0.1:3000/graphql
201201
100 connections
202202
203203
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
@@ -223,7 +223,7 @@ Req/Bytes counts sampled once per second.
223223
Last run: `2021-09-27`
224224

225225
```text
226-
Running 10s test @ http://localhost:3000/graphql
226+
Running 10s test @ http://127.0.0.1:3000/graphql
227227
100 connections
228228
229229
┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
@@ -249,7 +249,7 @@ Req/Bytes counts sampled once per second.
249249
Last run: `2021-09-27`
250250

251251
```text
252-
Running 10s test @ http://localhost:3000/graphql
252+
Running 10s test @ http://127.0.0.1:3000/graphql
253253
100 connections
254254
255255
┌─────────┬───────┬───────┬───────┬────────┬──────────┬──────────┬────────┐
@@ -275,7 +275,7 @@ Req/Bytes counts sampled once per second.
275275
Last run: `2021-09-27`
276276

277277
```text
278-
Running 10s test @ http://localhost:3000/graphql
278+
Running 10s test @ http://127.0.0.1:3000/graphql
279279
100 connections
280280
281281
┌─────────┬───────┬───────┬───────┬────────┬──────────┬──────────┬────────┐

bench/gateway-bench.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const query = `
2222

2323
const instance = autocannon(
2424
{
25-
url: 'http://localhost:3000/graphql',
25+
url: 'http://127.0.0.1:3000/graphql',
2626
connections: 100,
2727
title: '',
2828
method: 'POST',

bench/gateway-post-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ app.register(mercurius, {
7777
jit: 1
7878
})
7979

80-
app.listen(3002)
80+
app.listen({ port: 3002 })

bench/gateway-user-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ app.register(mercurius, {
4747
jit: 1
4848
})
4949

50-
app.listen(3001)
50+
app.listen({ port: 3001 })

bench/gateway-with-validation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ app.register(mercurius, {
1010
gateway: {
1111
services: [{
1212
name: 'user',
13-
url: 'http://localhost:3001/graphql'
13+
url: 'http://127.0.0.1:3001/graphql'
1414
}, {
1515
name: 'post',
16-
url: 'http://localhost:3002/graphql'
16+
url: 'http://127.0.0.1:3002/graphql'
1717
}]
1818
},
1919
graphiql: false,
@@ -38,4 +38,4 @@ app.register(mercuriusValidation, {
3838
}
3939
})
4040

41-
app.listen(3000)
41+
app.listen({ port: 3000 })

bench/gateway-without-validation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ app.register(mercurius, {
99
gateway: {
1010
services: [{
1111
name: 'user',
12-
url: 'http://localhost:3001/graphql'
12+
url: 'http://127.0.0.1:3001/graphql'
1313
}, {
1414
name: 'post',
15-
url: 'http://localhost:3002/graphql'
15+
url: 'http://127.0.0.1:3002/graphql'
1616
}]
1717
},
1818
graphiql: false,
1919
jit: 1
2020
})
2121

22-
app.listen(3000)
22+
app.listen({ port: 3000 })

bench/normal-bench.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const query = `query {
2020

2121
const instance = autocannon(
2222
{
23-
url: 'http://localhost:3000/graphql',
23+
url: 'http://127.0.0.1:3000/graphql',
2424
connections: 100,
2525
title: '',
2626
method: 'POST',

bench/normal-with-validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ app.register(mercuriusValidation, {
4141
}
4242
})
4343

44-
app.listen(3000)
44+
app.listen({ port: 3000 })

bench/normal-without-validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ app.register(mercurius, {
1313
jit: 1
1414
})
1515

16-
app.listen(3000)
16+
app.listen({ port: 3000 })

docs/registration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ app.register(mercuriusValidation, {
5252
validationDirective: 'validation'
5353
})
5454

55-
app.listen(3000)
55+
app.listen({ port: 3000 })
5656
```

0 commit comments

Comments
 (0)