mercurius-auth
Advanced tools
Comparing version 2.0.2 to 3.0.0
@@ -24,3 +24,3 @@ 'use strict' | ||
{ | ||
url: 'http://localhost:3000/graphql', | ||
url: 'http://127.0.0.1:3000/graphql', | ||
connections: 100, | ||
@@ -27,0 +27,0 @@ title: '', |
@@ -61,2 +61,2 @@ 'use strict' | ||
app.listen(3001) | ||
app.listen({ port: 3001 }) |
@@ -91,2 +91,2 @@ 'use strict' | ||
app.listen(3002) | ||
app.listen({ port: 3002 }) |
@@ -13,6 +13,6 @@ 'use strict' | ||
name: 'user', | ||
url: 'http://localhost:3001/graphql' | ||
url: 'http://127.0.0.1:3001/graphql' | ||
}, { | ||
name: 'post', | ||
url: 'http://localhost:3002/graphql' | ||
url: 'http://127.0.0.1:3002/graphql' | ||
}] | ||
@@ -36,2 +36,2 @@ }, | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -12,6 +12,6 @@ 'use strict' | ||
name: 'user', | ||
url: 'http://localhost:3001/graphql' | ||
url: 'http://127.0.0.1:3001/graphql' | ||
}, { | ||
name: 'post', | ||
url: 'http://localhost:3002/graphql' | ||
url: 'http://127.0.0.1:3002/graphql' | ||
}] | ||
@@ -23,2 +23,2 @@ }, | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -24,3 +24,3 @@ 'use strict' | ||
{ | ||
url: 'http://localhost:3000/graphql', | ||
url: 'http://127.0.0.1:3000/graphql', | ||
connections: 100, | ||
@@ -27,0 +27,0 @@ title: '', |
@@ -23,3 +23,3 @@ 'use strict' | ||
{ | ||
url: 'http://localhost:3000/graphql', | ||
url: 'http://127.0.0.1:3000/graphql', | ||
connections: 100, | ||
@@ -26,0 +26,0 @@ title: '', |
@@ -29,2 +29,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -30,2 +30,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -16,2 +16,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -110,3 +110,3 @@ # Advanced | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -176,3 +176,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` |
@@ -143,3 +143,3 @@ # mercurius-auth | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -220,3 +220,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` |
@@ -73,3 +73,3 @@ # Apply Policy | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -173,3 +173,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` |
@@ -58,3 +58,3 @@ # Auth context | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -117,3 +117,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
} | ||
@@ -120,0 +120,0 @@ |
@@ -54,3 +54,3 @@ # Auth directive | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -115,3 +115,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -191,3 +191,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` |
@@ -108,3 +108,3 @@ # Errors | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -166,3 +166,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -169,0 +169,0 @@ ### Status Code |
@@ -19,3 +19,3 @@ # Federation | ||
}) | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -157,6 +157,6 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql` | ||
url: `http://127.0.0.1:${userServicePort}/graphql` | ||
}, { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql` | ||
url: `http://127.0.0.1:${postServicePort}/graphql` | ||
}] | ||
@@ -178,3 +178,3 @@ } | ||
await gateway.listen(3000) | ||
await gateway.listen({ port: 3000 }) | ||
} | ||
@@ -181,0 +181,0 @@ |
@@ -50,3 +50,3 @@ # GraphQL Schema Filtering | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -53,0 +53,0 @@ |
@@ -85,2 +85,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -49,2 +49,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -52,2 +52,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -71,2 +71,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -40,3 +40,3 @@ 'use strict' | ||
}) | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -180,3 +180,3 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql`, | ||
url: `http://127.0.0.1:${userServicePort}/graphql`, | ||
rewriteHeaders: (headers, context) => { | ||
@@ -192,3 +192,3 @@ if (headers['x-user']) { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql`, | ||
url: `http://127.0.0.1:${postServicePort}/graphql`, | ||
rewriteHeaders: (headers, context) => { | ||
@@ -207,5 +207,5 @@ if (headers['x-user']) { | ||
await gateway.listen(3000) | ||
await gateway.listen({ port: 3000 }) | ||
} | ||
start() |
@@ -14,3 +14,3 @@ 'use strict' | ||
}) | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -152,6 +152,6 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql` | ||
url: `http://127.0.0.1:${userServicePort}/graphql` | ||
}, { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql` | ||
url: `http://127.0.0.1:${postServicePort}/graphql` | ||
}] | ||
@@ -173,5 +173,5 @@ } | ||
await gateway.listen(3000) | ||
await gateway.listen({ port: 3000 }) | ||
} | ||
start() |
@@ -58,2 +58,2 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) |
@@ -51,5 +51,5 @@ 'use strict' | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
} | ||
start() |
@@ -40,3 +40,3 @@ 'use strict' | ||
name: 'mercurius-auth', | ||
fastify: '>=3.x', | ||
fastify: '4.x', | ||
dependencies: ['mercurius'] | ||
@@ -43,0 +43,0 @@ } |
{ | ||
"name": "mercurius-auth", | ||
"version": "2.0.2", | ||
"version": "3.0.0", | ||
"description": "Mercurius Auth Plugin adds configurable Authentication and Authorization support to Mercurius.", | ||
@@ -33,18 +33,18 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@sinonjs/fake-timers": "^9.0.0", | ||
"@types/node": "^17.0.0", | ||
"@types/ws": "^8.2.0", | ||
"@typescript-eslint/eslint-plugin": "^5.3.1", | ||
"@typescript-eslint/parser": "^5.3.1", | ||
"autocannon": "^7.0.5", | ||
"concurrently": "^7.0.0", | ||
"fastify": "^3.0.2", | ||
"mercurius": "^9.1.0", | ||
"@sinonjs/fake-timers": "^9.1.2", | ||
"@types/node": "^18.0.3", | ||
"@types/ws": "^8.5.3", | ||
"@typescript-eslint/eslint-plugin": "^5.30.5", | ||
"@typescript-eslint/parser": "^5.30.5", | ||
"autocannon": "^7.9.0", | ||
"concurrently": "^7.2.2", | ||
"fastify": "^4.2.0", | ||
"mercurius": "^10.1.0", | ||
"pre-commit": "^1.2.2", | ||
"snazzy": "^9.0.0", | ||
"standard": "^17.0.0", | ||
"tap": "^16.0.0", | ||
"tsd": "^0.20.0", | ||
"typescript": "^4.0.3", | ||
"wait-on": "^6.0.0" | ||
"tap": "^16.3.0", | ||
"tsd": "^0.22.0", | ||
"typescript": "^4.7.4", | ||
"wait-on": "^6.0.1" | ||
}, | ||
@@ -51,0 +51,0 @@ "dependencies": { |
@@ -96,3 +96,3 @@ # mercurius-auth | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -185,3 +185,3 @@ | ||
app.listen(3000) | ||
app.listen({ port: 3000 }) | ||
``` | ||
@@ -188,0 +188,0 @@ |
@@ -48,3 +48,3 @@ 'use strict' | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -191,3 +191,3 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql`, | ||
url: `http://127.0.0.1:${userServicePort}/graphql`, | ||
rewriteHeaders: (headers, context) => { | ||
@@ -203,3 +203,3 @@ if (headers['x-user']) { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql`, | ||
url: `http://127.0.0.1:${postServicePort}/graphql`, | ||
rewriteHeaders: (headers, context) => { | ||
@@ -206,0 +206,0 @@ if (headers['x-user']) { |
@@ -15,3 +15,3 @@ 'use strict' | ||
}) | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -157,6 +157,6 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql` | ||
url: `http://127.0.0.1:${userServicePort}/graphql` | ||
}, { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql` | ||
url: `http://127.0.0.1:${postServicePort}/graphql` | ||
}] | ||
@@ -163,0 +163,0 @@ } |
@@ -16,3 +16,3 @@ 'use strict' | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -133,3 +133,3 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql`, | ||
url: `http://127.0.0.1:${userServicePort}/graphql`, | ||
rewriteHeaders: (headers, context) => { | ||
@@ -142,3 +142,3 @@ return { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql`, | ||
url: `http://127.0.0.1:${postServicePort}/graphql`, | ||
rewriteHeaders: (headers, context) => { | ||
@@ -145,0 +145,0 @@ return { |
@@ -15,3 +15,3 @@ 'use strict' | ||
}) | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -131,6 +131,6 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql` | ||
url: `http://127.0.0.1:${userServicePort}/graphql` | ||
}, { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql` | ||
url: `http://127.0.0.1:${postServicePort}/graphql` | ||
}] | ||
@@ -137,0 +137,0 @@ } |
@@ -60,3 +60,3 @@ 'use strict' | ||
await userService.listen(0) | ||
await userService.listen({ port: 0 }) | ||
@@ -70,3 +70,3 @@ const userServicePort = userService.server.address().port | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql` | ||
url: `http://127.0.0.1:${userServicePort}/graphql` | ||
} | ||
@@ -246,3 +246,3 @@ ], | ||
await userService.listen(0) | ||
await userService.listen({ port: 0 }) | ||
@@ -256,3 +256,3 @@ const userServicePort = userService.server.address().port | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql` | ||
url: `http://127.0.0.1:${userServicePort}/graphql` | ||
} | ||
@@ -259,0 +259,0 @@ ], |
@@ -15,3 +15,3 @@ 'use strict' | ||
}) | ||
await service.listen(0) | ||
await service.listen({ port: 0 }) | ||
return [service, service.server.address().port] | ||
@@ -139,6 +139,6 @@ } | ||
name: 'user', | ||
url: `http://localhost:${userServicePort}/graphql` | ||
url: `http://127.0.0.1:${userServicePort}/graphql` | ||
}, { | ||
name: 'post', | ||
url: `http://localhost:${postServicePort}/graphql` | ||
url: `http://127.0.0.1:${postServicePort}/graphql` | ||
}] | ||
@@ -145,0 +145,0 @@ } |
Sorry, the diff of this file is not supported yet
278566