From c922bf2ec39bfe777c0ccdede92218657fe1737d Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Thu, 14 Mar 2024 14:45:30 +0530 Subject: [PATCH 01/24] Add remaining scalar types to inferJSONSchemaType --- lib/utils.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index d7f4a21..a00c157 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,6 +1,6 @@ 'use strict' -const { isNonNullType, getNamedType, GraphQLString, GraphQLInt, GraphQLFloat } = require('graphql') +const { isNonNullType, getNamedType, GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID } = require('graphql') const { MER_VALIDATION_ERR_INVALID_OPTS } = require('./errors') /** @@ -45,6 +45,12 @@ function inferJSONSchemaType (type, isNonNull) { if (type === GraphQLFloat) { return isNonNull ? { type: 'number' } : { type: ['number', 'null'] } } + if (type === GraphQLBoolean) { + return isNonNull ? { type: 'boolean' } : { type: ['boolean', 'null'] } + } + if (type === GraphQLID) { + return isNonNull ? { type: 'id' } : { type: ['id', 'null'] } + } return {} } From 2d642a30683b52106478d6b64c293b7a95b89fc2 Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Thu, 14 Mar 2024 21:25:25 +0530 Subject: [PATCH 02/24] Remove unwanted code to fix failing unit tests --- lib/utils.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index a00c157..f0572a7 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,6 +1,6 @@ 'use strict' -const { isNonNullType, getNamedType, GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID } = require('graphql') +const { isNonNullType, getNamedType, GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean } = require('graphql') const { MER_VALIDATION_ERR_INVALID_OPTS } = require('./errors') /** @@ -48,9 +48,6 @@ function inferJSONSchemaType (type, isNonNull) { if (type === GraphQLBoolean) { return isNonNull ? { type: 'boolean' } : { type: ['boolean', 'null'] } } - if (type === GraphQLID) { - return isNonNull ? { type: 'id' } : { type: ['id', 'null'] } - } return {} } From 90dacee5b257e588be2449a25f0b40baf8dc40d4 Mon Sep 17 00:00:00 2001 From: Jonny Green Date: Fri, 15 Mar 2024 14:04:23 +0000 Subject: [PATCH 03/24] Deprecate Node.js 16 support and update deps --- .github/workflows/ci.yml | 2 +- package.json | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca10e78..980e848 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [18.x, 20.x] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - uses: actions/checkout@v3 diff --git a/package.json b/package.json index d41d0f2..84822bf 100644 --- a/package.json +++ b/package.json @@ -35,23 +35,23 @@ "homepage": "https://github.com/mercurius-js/validation", "devDependencies": { "@mercuriusjs/federation": "^2.0.0", - "@mercuriusjs/gateway": "^1.0.0", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "^20.1.0", - "@types/ws": "^8.5.3", + "@mercuriusjs/gateway": "^2.0.0", + "@sinonjs/fake-timers": "^11.2.2", + "@types/node": "^20.11.28", + "@types/ws": "^8.5.10", "@typescript-eslint/eslint-plugin": "^5.30.3", "@typescript-eslint/parser": "^5.30.3", - "autocannon": "^7.9.0", - "concurrently": "^8.0.1", - "fastify": "^4.2.0", - "mercurius": "^13.0.0", + "autocannon": "^7.15.0", + "concurrently": "^8.2.2", + "fastify": "^4.26.2", + "mercurius": "^13.4.0", "pre-commit": "^1.2.2", "snazzy": "^9.0.0", - "standard": "^17.0.0", + "standard": "^17.1.0", "tap": "^16.3.0", "tsd": "^0.28.0", - "typescript": "^5.0.2", - "wait-on": "^7.0.1" + "typescript": "^5.4.2", + "wait-on": "^7.2.0" }, "dependencies": { "@fastify/error": "^3.0.0", From 83aee9ddf08d87682a817e3e32cebc07e40cd8ee Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Mon, 18 Mar 2024 13:13:01 +0530 Subject: [PATCH 04/24] Make inferJSONSchemaType through the plugin options --- lib/utils.js | 8 ++++---- lib/validators/json-schema-validator.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index f0572a7..0504d32 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,6 +1,6 @@ 'use strict' -const { isNonNullType, getNamedType, GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean } = require('graphql') +const { isNonNullType, getNamedType, GraphQLString, GraphQLInt, GraphQLFloat } = require('graphql') const { MER_VALIDATION_ERR_INVALID_OPTS } = require('./errors') /** @@ -35,7 +35,7 @@ function validateOpts (opts) { return opts } -function inferJSONSchemaType (type, isNonNull) { +function inferJSONSchemaType (type, isNonNull, inferCustomType) { if (type === GraphQLString) { return isNonNull ? { type: 'string' } : { type: ['string', 'null'] } } @@ -45,8 +45,8 @@ function inferJSONSchemaType (type, isNonNull) { if (type === GraphQLFloat) { return isNonNull ? { type: 'number' } : { type: ['number', 'null'] } } - if (type === GraphQLBoolean) { - return isNonNull ? { type: 'boolean' } : { type: ['boolean', 'null'] } + if (inferCustomType) { + inferCustomType(type, isNonNull) } return {} } diff --git a/lib/validators/json-schema-validator.js b/lib/validators/json-schema-validator.js index a9a7534..692b804 100644 --- a/lib/validators/json-schema-validator.js +++ b/lib/validators/json-schema-validator.js @@ -12,7 +12,7 @@ const { getTypeInfo, inferJSONSchemaType } = require('../utils') class JSONSchemaValidator extends Validator { [kValidationSchema] (type, namedType, isNonNull, typeValidation, id) { let builtValidationSchema = { - ...inferJSONSchemaType(namedType, isNonNull), + ...inferJSONSchemaType(namedType, isNonNull, this[kOpts].inferCustomType), $id: id } @@ -26,7 +26,7 @@ class JSONSchemaValidator extends Validator { } // If we have an array of scalars, set the array type and infer the items } else if (isListType(type)) { - let items = { ...inferJSONSchemaType(namedType, isNonNull), ...builtValidationSchema.items } + let items = { ...inferJSONSchemaType(namedType, isNonNull, this[kOpts].inferCustomType), ...builtValidationSchema.items } if (typeValidation !== null) { items = { ...items, ...typeValidation.items } } From d8f5b85b1e8a6f00487c5202352360712b579499 Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Mon, 18 Mar 2024 14:17:12 +0530 Subject: [PATCH 05/24] Add tests for new changes --- test/json-schema-validation.js | 130 ++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/test/json-schema-validation.js b/test/json-schema-validation.js index 3d55640..0d39cc4 100644 --- a/test/json-schema-validation.js +++ b/test/json-schema-validation.js @@ -5,6 +5,7 @@ const Fastify = require('fastify') const mercurius = require('mercurius') const mercuriusValidation = require('..') const { MER_VALIDATION_ERR_FIELD_TYPE_UNDEFINED } = require('../lib/errors') +const { GraphQLBoolean } = require('graphql') const schema = ` type Message { @@ -69,7 +70,7 @@ const resolvers = { } t.test('JSON Schema validators', t => { - t.plan(18) + t.plan(19) t.test('should protect the schema and not affect operations when everything is okay', async (t) => { t.plan(1) @@ -2089,4 +2090,131 @@ t.test('JSON Schema validators', t => { } }) }) + + t.test('should invoke inferCustomType option and not affect operations when everything is okay', async (t) => { + t.plan(1) + + const productSchema = ` + type Product { + id: ID! + text: String + isAvailable: Boolean + } + + input Filters { + id: ID + text: String + isAvailable: Boolean + } + + type Query { + noResolver(id: ID): ID + product(id: ID): Product + products( + filters: Filters + ): [Product] + } + ` + + const products = [ + { + id: 0, + text: 'Phone', + isAvailable: true + }, + { + id: 1, + text: 'Laptop', + isAvailable: true + }, + { + id: 2, + text: 'Keyboard', + isAvailable: false + } + ] + + const productResolvers = { + Query: { + product: async (_, { id }) => { + return products.find(product => product.id === Number(id)) + }, + products: async () => { + return products + } + } + } + + const app = Fastify() + t.teardown(app.close.bind(app)) + + app.register(mercurius, { + productSchema, + productResolvers + }) + app.register(mercuriusValidation, { + schema: { + Filters: { + isAvailable: { type: 'boolean' } + }, + Query: { + product: { + id: { type: 'string', minLength: 1 } + } + } + }, + inferCustomType: (type, isNonNull) => { + if (type === GraphQLBoolean) { + return isNonNull ? { type: 'boolean' } : { type: ['boolean', 'null'] } + } + } + }) + + const productQuery = `query { + product(id: "1") { + id + text + isAvailable + } + products(filters: { isAvailable: true }) { + id + text + isAvailable + } + }` + + const response = await app.inject({ + method: 'POST', + headers: { 'content-type': 'application/json' }, + url: '/graphql', + body: JSON.stringify({ productQuery }) + }) + + t.same(JSON.parse(response.body), { + data: { + product: { + id: 1, + text: 'Laptop', + isAvailable: true + }, + products: [ + { + id: 0, + text: 'Phone', + isAvailable: true + }, + { + id: 1, + text: 'Laptop', + isAvailable: true + }, + { + id: 2, + text: 'Keyboard', + isAvailable: false + } + ] + } + }) + }) }) From 7c8be3acc9de6bcf7809092ec96e740622015167 Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Mon, 18 Mar 2024 14:24:56 +0530 Subject: [PATCH 06/24] Fix issues in unit tests --- test/json-schema-validation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/json-schema-validation.js b/test/json-schema-validation.js index 0d39cc4..b7ec582 100644 --- a/test/json-schema-validation.js +++ b/test/json-schema-validation.js @@ -2149,8 +2149,8 @@ t.test('JSON Schema validators', t => { t.teardown(app.close.bind(app)) app.register(mercurius, { - productSchema, - productResolvers + schema: productSchema, + resolvers: productResolvers }) app.register(mercuriusValidation, { schema: { @@ -2170,7 +2170,7 @@ t.test('JSON Schema validators', t => { } }) - const productQuery = `query { + const query = `query { product(id: "1") { id text @@ -2187,7 +2187,7 @@ t.test('JSON Schema validators', t => { method: 'POST', headers: { 'content-type': 'application/json' }, url: '/graphql', - body: JSON.stringify({ productQuery }) + body: JSON.stringify({ query }) }) t.same(JSON.parse(response.body), { From 602b69adc1e40ed703b229b375b4c380b0aeff52 Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Mon, 18 Mar 2024 15:36:27 +0530 Subject: [PATCH 07/24] Fix issues --- lib/utils.js | 2 +- test/json-schema-validation.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 0504d32..f55986d 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -46,7 +46,7 @@ function inferJSONSchemaType (type, isNonNull, inferCustomType) { return isNonNull ? { type: 'number' } : { type: ['number', 'null'] } } if (inferCustomType) { - inferCustomType(type, isNonNull) + return inferCustomType(type, isNonNull) } return {} } diff --git a/test/json-schema-validation.js b/test/json-schema-validation.js index b7ec582..de1f7b7 100644 --- a/test/json-schema-validation.js +++ b/test/json-schema-validation.js @@ -2139,8 +2139,8 @@ t.test('JSON Schema validators', t => { product: async (_, { id }) => { return products.find(product => product.id === Number(id)) }, - products: async () => { - return products + products: async (_, { filters }) => { + return products.filter(product => product.isAvailable === filters.isAvailable) } } } @@ -2167,6 +2167,7 @@ t.test('JSON Schema validators', t => { if (type === GraphQLBoolean) { return isNonNull ? { type: 'boolean' } : { type: ['boolean', 'null'] } } + return {} } }) @@ -2207,11 +2208,6 @@ t.test('JSON Schema validators', t => { id: 1, text: 'Laptop', isAvailable: true - }, - { - id: 2, - text: 'Keyboard', - isAvailable: false } ] } From 8b4208bc79b68eebe6a179976721932b9fc178a4 Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Mon, 18 Mar 2024 15:39:09 +0530 Subject: [PATCH 08/24] Fix review comment --- test/json-schema-validation.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/json-schema-validation.js b/test/json-schema-validation.js index de1f7b7..a73d0b5 100644 --- a/test/json-schema-validation.js +++ b/test/json-schema-validation.js @@ -2092,8 +2092,6 @@ t.test('JSON Schema validators', t => { }) t.test('should invoke inferCustomType option and not affect operations when everything is okay', async (t) => { - t.plan(1) - const productSchema = ` type Product { id: ID! From 8b88031e886bd338c9e355b2c8e1f8b3c288732d Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Tue, 19 Mar 2024 11:54:48 +0530 Subject: [PATCH 09/24] Address latest review comment --- lib/utils.js | 11 +++++++---- lib/validators/json-schema-validator.js | 4 ++-- test/json-schema-validation.js | 5 ++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index f55986d..9255ffd 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -35,7 +35,13 @@ function validateOpts (opts) { return opts } -function inferJSONSchemaType (type, isNonNull, inferCustomType) { +function inferJSONSchemaType (type, isNonNull, customTypeInferenceFn) { + if (customTypeInferenceFn) { + const customResponse = customTypeInferenceFn(type, isNonNull) + if (customResponse) { + return customResponse + } + } if (type === GraphQLString) { return isNonNull ? { type: 'string' } : { type: ['string', 'null'] } } @@ -45,9 +51,6 @@ function inferJSONSchemaType (type, isNonNull, inferCustomType) { if (type === GraphQLFloat) { return isNonNull ? { type: 'number' } : { type: ['number', 'null'] } } - if (inferCustomType) { - return inferCustomType(type, isNonNull) - } return {} } diff --git a/lib/validators/json-schema-validator.js b/lib/validators/json-schema-validator.js index 692b804..fe9da54 100644 --- a/lib/validators/json-schema-validator.js +++ b/lib/validators/json-schema-validator.js @@ -12,7 +12,7 @@ const { getTypeInfo, inferJSONSchemaType } = require('../utils') class JSONSchemaValidator extends Validator { [kValidationSchema] (type, namedType, isNonNull, typeValidation, id) { let builtValidationSchema = { - ...inferJSONSchemaType(namedType, isNonNull, this[kOpts].inferCustomType), + ...inferJSONSchemaType(namedType, isNonNull, this[kOpts].customTypeInferenceFn), $id: id } @@ -26,7 +26,7 @@ class JSONSchemaValidator extends Validator { } // If we have an array of scalars, set the array type and infer the items } else if (isListType(type)) { - let items = { ...inferJSONSchemaType(namedType, isNonNull, this[kOpts].inferCustomType), ...builtValidationSchema.items } + let items = { ...inferJSONSchemaType(namedType, isNonNull, this[kOpts].customTypeInferenceFn), ...builtValidationSchema.items } if (typeValidation !== null) { items = { ...items, ...typeValidation.items } } diff --git a/test/json-schema-validation.js b/test/json-schema-validation.js index a73d0b5..1e5b7ad 100644 --- a/test/json-schema-validation.js +++ b/test/json-schema-validation.js @@ -2091,7 +2091,7 @@ t.test('JSON Schema validators', t => { }) }) - t.test('should invoke inferCustomType option and not affect operations when everything is okay', async (t) => { + t.test('should invoke customTypeInferenceFn option and not affect operations when everything is okay', async (t) => { const productSchema = ` type Product { id: ID! @@ -2161,11 +2161,10 @@ t.test('JSON Schema validators', t => { } } }, - inferCustomType: (type, isNonNull) => { + customTypeInferenceFn: (type, isNonNull) => { if (type === GraphQLBoolean) { return isNonNull ? { type: 'boolean' } : { type: ['boolean', 'null'] } } - return {} } }) From a510290caa7ed8e7031cdb03de3cbb37856929b8 Mon Sep 17 00:00:00 2001 From: Mohammed Bilal Shareef Date: Tue, 19 Mar 2024 13:21:16 +0530 Subject: [PATCH 10/24] Update docs for the latest changes --- docs/api/options.md | 1 + docs/json-schema-validation.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/docs/api/options.md b/docs/api/options.md index 9631c68..6760909 100644 --- a/docs/api/options.md +++ b/docs/api/options.md @@ -11,6 +11,7 @@ Extends: [`AJVOptions`](https://ajv.js.org/options.html) * **mode** `"JSONSchema" | "JTD"` (optional, default: `"JSONSchema"`) - the validation mode of the plugin. This is used to specify the type of schema that needs to be compiled. * **schema** `MercuriusValidationSchema` (optional) - the validation schema definition that the plugin with run. One can define JSON Schema or JTD definitions for GraphQL types, fields and arguments or functions for GraphQL arguments. * **directiveValidation** `boolean` (optional, default: `true`) - turn directive validation on or off. It is on by default. +* **customTypeInferenceFn** `Function` (optional) - add custom type inference for JSON Schema Types. This function overrides the default type inference logic which infers GraphQL primitives like `GraphQLString`, `GraphQLInt` and `GraphQLFloat`. If the custom function doesn't handle the passed type, then it should return a falsy value which will trigger the default type inference logic of the plugin. This function takes two parameters. The first parameter is `type` referring to the GraphQL type under inference, while the second one is `isNonNull`, a boolean value referring whether the value for the type is nullable. It extends the [AJV options](https://ajv.js.org/options.html). These can be used to register additional `formats` for example and provide further customization to the AJV validation behavior. diff --git a/docs/json-schema-validation.md b/docs/json-schema-validation.md index 00e58cf..2a2975e 100644 --- a/docs/json-schema-validation.md +++ b/docs/json-schema-validation.md @@ -478,6 +478,28 @@ app.register(mercuriusValidation, { }) ``` +The type inference is customizable. You can pass `customTypeInferenceFn` in the plugin options and have your own inference logic inside the function. The below code is an example for custom type inference for `GraphQLBoolean` <=> `{ type: 'boolean' }`. + +```js +app.register(mercuriusValidation, { + schema: { + Filters: { + isAvailable: { type: 'boolean' } + }, + Query: { + product: { + id: { type: 'string', minLength: 1 } + } + } + }, + customTypeInferenceFn: (type, isNonNull) => { + if (type === GraphQLBoolean) { + return isNonNull ? { type: 'boolean' } : { type: ['boolean', 'null'] } + } + } +}) +``` + ## Caveats The use of the `$ref` keyword is not advised because we use this through the plugin to build up the GraphQL type validation. However, we have not prevented use of this keyword since it may be useful in some situations. From ede3203d482c8fedbf40cdad57d4615065355d45 Mon Sep 17 00:00:00 2001 From: Jonny Green Date: Wed, 20 Mar 2024 22:46:04 +0000 Subject: [PATCH 11/24] 5.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84822bf..fd84333 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mercurius-validation", - "version": "4.0.0", + "version": "5.0.0", "description": "Mercurius Validation Plugin adds configurable Validation support to Mercurius.", "main": "index.js", "types": "index.d.ts", From ef2eb40c3025aa417b2f8c4d87258c85f1fc15cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 23:17:18 +0000 Subject: [PATCH 12/24] Bump tsd from 0.28.1 to 0.30.7 (#91) Bumps [tsd](https://github.com/tsdjs/tsd) from 0.28.1 to 0.30.7. - [Release notes](https://github.com/tsdjs/tsd/releases) - [Commits](https://github.com/tsdjs/tsd/compare/v0.28.1...v0.30.7) --- updated-dependencies: - dependency-name: tsd dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd84333..44c91f7 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "snazzy": "^9.0.0", "standard": "^17.1.0", "tap": "^16.3.0", - "tsd": "^0.28.0", + "tsd": "^0.30.7", "typescript": "^5.4.2", "wait-on": "^7.2.0" }, From 53b91e82ae87612578bcbc33a46951d6d3ef94b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 03:16:41 +0000 Subject: [PATCH 13/24] Bump mercurius from 13.4.1 to 14.0.0 (#92) Bumps [mercurius](https://github.com/mercurius-js/mercurius) from 13.4.1 to 14.0.0. - [Release notes](https://github.com/mercurius-js/mercurius/releases) - [Commits](https://github.com/mercurius-js/mercurius/compare/v13.4.1...v14.0.0) --- updated-dependencies: - dependency-name: mercurius dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44c91f7..32d77e2 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "autocannon": "^7.15.0", "concurrently": "^8.2.2", "fastify": "^4.26.2", - "mercurius": "^13.4.0", + "mercurius": "^14.0.0", "pre-commit": "^1.2.2", "snazzy": "^9.0.0", "standard": "^17.1.0", From 18c8da010d4eb3d1abe6640b29beb6faf08b7779 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 03:17:39 +0000 Subject: [PATCH 14/24] Bump @mercuriusjs/federation from 2.0.0 to 3.0.0 (#93) Bumps [@mercuriusjs/federation](https://github.com/mercurius-js/mercurius-federation) from 2.0.0 to 3.0.0. - [Release notes](https://github.com/mercurius-js/mercurius-federation/releases) - [Commits](https://github.com/mercurius-js/mercurius-federation/compare/2.0.0...v3.0.0) --- updated-dependencies: - dependency-name: "@mercuriusjs/federation" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 32d77e2..539b173 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/mercurius-js/validation", "devDependencies": { - "@mercuriusjs/federation": "^2.0.0", + "@mercuriusjs/federation": "^3.0.0", "@mercuriusjs/gateway": "^2.0.0", "@sinonjs/fake-timers": "^11.2.2", "@types/node": "^20.11.28", From df99ff4aa137797d27e6db911c0b755cc0929771 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 03:19:01 +0000 Subject: [PATCH 15/24] Bump @mercuriusjs/gateway from 2.2.0 to 3.0.0 (#95) Bumps [@mercuriusjs/gateway](https://github.com/mercurius-js/federation-support) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/mercurius-js/federation-support/releases) - [Commits](https://github.com/mercurius-js/federation-support/compare/v2.2.0...v3.0.0) --- updated-dependencies: - dependency-name: "@mercuriusjs/gateway" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 539b173..02ed395 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "homepage": "https://github.com/mercurius-js/validation", "devDependencies": { "@mercuriusjs/federation": "^3.0.0", - "@mercuriusjs/gateway": "^2.0.0", + "@mercuriusjs/gateway": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", "@types/node": "^20.11.28", "@types/ws": "^8.5.10", From 7f8c76f124e645e6fedcd5468e446ea05e7898fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:22:35 +0000 Subject: [PATCH 16/24] Bump actions/setup-node from 3 to 4 (#96) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 980e848..51fe66c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Install Dependencies From bf75483bf3a5d484e88adbd0d3729185fd8a3185 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:23:38 +0000 Subject: [PATCH 17/24] Bump actions/checkout from 3 to 4 (#97) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51fe66c..23b39a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: node-version: [18.x, 20.x] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: From 95934c8456e4daf0245b05181a89a28b947a5853 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:47:55 +0000 Subject: [PATCH 18/24] Bump tsd from 0.30.7 to 0.31.0 (#99) Bumps [tsd](https://github.com/tsdjs/tsd) from 0.30.7 to 0.31.0. - [Release notes](https://github.com/tsdjs/tsd/releases) - [Commits](https://github.com/tsdjs/tsd/compare/v0.30.7...v0.31.0) --- updated-dependencies: - dependency-name: tsd dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 02ed395..35ffb6d 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "snazzy": "^9.0.0", "standard": "^17.1.0", "tap": "^16.3.0", - "tsd": "^0.30.7", + "tsd": "^0.31.0", "typescript": "^5.4.2", "wait-on": "^7.2.0" }, From 4640e492b840ea23bb9bbca741e2a22907e66829 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:49:30 +0000 Subject: [PATCH 19/24] Bump ajv-formats from 2.1.1 to 3.0.1 (#100) Bumps [ajv-formats](https://github.com/ajv-validator/ajv-formats) from 2.1.1 to 3.0.1. - [Release notes](https://github.com/ajv-validator/ajv-formats/releases) - [Commits](https://github.com/ajv-validator/ajv-formats/compare/v2.1.1...v3.0.1) --- updated-dependencies: - dependency-name: ajv-formats dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 35ffb6d..7022a2a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@fastify/error": "^3.0.0", "ajv": "^8.6.2", "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "fastify-plugin": "^4.0.0", "graphql": "^16.2.0" }, From 44779de2ea3385560854b6a22b8b616b920222a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 03:59:56 +0000 Subject: [PATCH 20/24] Bump @fastify/error from 3.4.1 to 4.0.0 (#105) Bumps [@fastify/error](https://github.com/fastify/fastify-error) from 3.4.1 to 4.0.0. - [Release notes](https://github.com/fastify/fastify-error/releases) - [Commits](https://github.com/fastify/fastify-error/compare/v3.4.1...v4.0.0) --- updated-dependencies: - dependency-name: "@fastify/error" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7022a2a..1866c2f 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "wait-on": "^7.2.0" }, "dependencies": { - "@fastify/error": "^3.0.0", + "@fastify/error": "^4.0.0", "ajv": "^8.6.2", "ajv-errors": "^3.0.0", "ajv-formats": "^3.0.1", From 0636d6c23ac59023a1dc231a4a0e4b04ec65ef6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 03:26:36 +0000 Subject: [PATCH 21/24] Bump @types/node from 20.14.13 to 22.0.0 (#108) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.13 to 22.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1866c2f..a179b25 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@mercuriusjs/federation": "^3.0.0", "@mercuriusjs/gateway": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", - "@types/node": "^20.11.28", + "@types/node": "^22.0.0", "@types/ws": "^8.5.10", "@typescript-eslint/eslint-plugin": "^5.30.3", "@typescript-eslint/parser": "^5.30.3", From 7186c56586e3c2d15e91142788477aa252ebea76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 03:43:03 +0000 Subject: [PATCH 22/24] Bump wait-on from 7.2.0 to 8.0.0 (#114) Bumps [wait-on](https://github.com/jeffbski/wait-on) from 7.2.0 to 8.0.0. - [Release notes](https://github.com/jeffbski/wait-on/releases) - [Commits](https://github.com/jeffbski/wait-on/compare/v7.2.0...v8.0.0) --- updated-dependencies: - dependency-name: wait-on dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a179b25..e0ce1f3 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "tap": "^16.3.0", "tsd": "^0.31.0", "typescript": "^5.4.2", - "wait-on": "^7.2.0" + "wait-on": "^8.0.0" }, "dependencies": { "@fastify/error": "^4.0.0", From 5dbff0d2a311fd43599a5e41c27041f5ffffebdd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 03:37:22 +0000 Subject: [PATCH 23/24] Bump concurrently from 8.2.2 to 9.0.0 (#119) Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 8.2.2 to 9.0.0. - [Release notes](https://github.com/open-cli-tools/concurrently/releases) - [Commits](https://github.com/open-cli-tools/concurrently/compare/v8.2.2...v9.0.0) --- updated-dependencies: - dependency-name: concurrently dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e0ce1f3..e8096f4 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@typescript-eslint/eslint-plugin": "^5.30.3", "@typescript-eslint/parser": "^5.30.3", "autocannon": "^7.15.0", - "concurrently": "^8.2.2", + "concurrently": "^9.0.0", "fastify": "^4.26.2", "mercurius": "^14.0.0", "pre-commit": "^1.2.2", From 2f9ed30df7b1085591b840c564101c72172b0966 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 03:54:09 +0000 Subject: [PATCH 24/24] Bump fastify-plugin from 4.5.1 to 5.0.1 (#124) Bumps [fastify-plugin](https://github.com/fastify/fastify-plugin) from 4.5.1 to 5.0.1. - [Release notes](https://github.com/fastify/fastify-plugin/releases) - [Commits](https://github.com/fastify/fastify-plugin/compare/v4.5.1...v5.0.1) --- updated-dependencies: - dependency-name: fastify-plugin dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8096f4..523c84d 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "ajv": "^8.6.2", "ajv-errors": "^3.0.0", "ajv-formats": "^3.0.1", - "fastify-plugin": "^4.0.0", + "fastify-plugin": "^5.0.1", "graphql": "^16.2.0" }, "tsd": {