diff --git a/.changeset/bold-webs-behave.md b/.changeset/bold-webs-behave.md new file mode 100644 index 00000000000..baa1d961424 --- /dev/null +++ b/.changeset/bold-webs-behave.md @@ -0,0 +1,11 @@ +--- +'@graphql-tools/executor-urql-exchange': minor +'@graphql-tools/executor-apollo-link': minor +'@graphql-tools/git-loader': minor +'@graphql-tools/executor': minor +'@graphql-tools/optimize': minor +'@graphql-tools/schema': minor +'@graphql-tools/utils': minor +--- + +Add support for graphql-js v17 diff --git a/package-lock.json b/package-lock.json index 83eaf2e67fb..25821b3cad2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "eslint-plugin-n": "18.2.2", "eslint-plugin-promise": "7.3.0", "globby": "11.1.0", - "graphql": "16.14.0", + "graphql": "17.0.2", "graphql-yoga": "5.21.2", "husky": "9.1.7", "jest": "30.4.2", @@ -110,9 +110,9 @@ } }, "node_modules/@antfu/install-pkg/node_modules/package-manager-detector": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz", - "integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.8.0.tgz", + "integrity": "sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==", "license": "MIT" }, "node_modules/@apollo/client": { @@ -2047,9 +2047,9 @@ } }, "node_modules/@changesets/apply-release-plan/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -2075,9 +2075,9 @@ } }, "node_modules/@changesets/assemble-release-plan/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -2201,9 +2201,9 @@ } }, "node_modules/@changesets/get-dependents-graph/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -2514,22 +2514,21 @@ } }, "node_modules/@emnapi/core": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.2.tgz", - "integrity": "sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { - "@emnapi/wasi-threads": "1.2.2", + "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.2.tgz", - "integrity": "sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==", + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", + "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", "license": "MIT", "optional": true, "dependencies": { @@ -2537,13 +2536,12 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", - "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -2610,34 +2608,6 @@ "graphql": "^15.4.0 || ^16.0.0" } }, - "node_modules/@envelop/live-query/node_modules/@n1ru4l/in-memory-live-query-store": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@n1ru4l/in-memory-live-query-store/-/in-memory-live-query-store-0.10.0.tgz", - "integrity": "sha512-pt7bZgTPz9dk7ceoOp76KIbVFFlAPe0e5A07UiZ19fQy3JPvvoLRdjmnKbUh3VsEUUh8MyytFcFRguaeiidAYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@graphql-tools/utils": "^8.5.2", - "@n1ru4l/graphql-live-query": "0.10.0", - "@repeaterjs/repeater": "^3.0.4" - }, - "peerDependencies": { - "graphql": "^15.4.0 || ^16.0.0" - } - }, - "node_modules/@envelop/live-query/node_modules/@n1ru4l/in-memory-live-query-store/node_modules/@graphql-tools/utils": { - "version": "8.13.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.13.1.tgz", - "integrity": "sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, "node_modules/@envelop/types": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/@envelop/types/-/types-5.2.1.tgz", @@ -3126,9 +3096,9 @@ "license": "MIT" }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", "dev": true, "license": "MIT", "dependencies": { @@ -3884,9 +3854,9 @@ } }, "node_modules/@ianvs/prettier-plugin-sort-imports/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -4501,9 +4471,9 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz", + "integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==", "license": "MIT", "dependencies": { "argparse": "^1.0.7", @@ -5409,16 +5379,16 @@ } }, "node_modules/@next/env": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.19.tgz", - "integrity": "sha512-sWWluFvcv5v3Fxznmf2ZfjyoVQt/64oCnYqS90inQWGzMPK1VjvekPiz3OPHKmFT30EnHrjlbyaHLt3M0vWabw==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.22.tgz", + "integrity": "sha512-O5BlKb3KtsHkvO0gjjV66PuJnAgCtIEIzwkt50HRAHsQkU1t77eksIXSZV84/WMtZJjWrnDUPKHVRi0D62nSAA==", "license": "MIT", "peer": true }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.19.tgz", - "integrity": "sha512-jx9wWlTKueHKPvVOndyr7WuaevWCkuYqsQ8gC0TMPKAVWG3MhcdMrjfo9tvIZNXd0QOUYXXvAcZ325y8Uq7uzg==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.22.tgz", + "integrity": "sha512-/VISwtffSg8+fVvBbXdglsvruCsdbBC4dG25iU6xascKVqfQKsj/OtjGnOEkIS7pX5GB9e9/r5QprpicsGL3gw==", "cpu": [ "arm64" ], @@ -5433,9 +5403,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.19.tgz", - "integrity": "sha512-291KFcsIQ3OenRdiUDFOR6W3wezzH4auENXm1gbm1Bjd4ANMMRgxPrWTUztQN43BnVoVuMnHCrLeECIMwgFKbA==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.22.tgz", + "integrity": "sha512-NiA9ve8hbiuhG/Q17a2mZDRVxMTtg3rTOgjLnDaLlE+AEPAQlkkuKrfePEbeOrgYmX0U2KGX4EVEn09hXU5GlQ==", "cpu": [ "x64" ], @@ -5450,12 +5420,15 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.19.tgz", - "integrity": "sha512-WeH+nelQyyMeE2f8FxBRZNrGipya5zHZV2vjzfCOAYyiI6am+NbnWAAldOBFQBB2w0DjJcsvrKqoFT2b7+5YoA==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.22.tgz", + "integrity": "sha512-vAPa9vltW+UW/KWtjXeSUFgV3wb1x9d/BeyC6WFI6eBpL0D2f70oGwtOp6193mNW3qusrpgBzMQferPf+Zh8Dw==", "cpu": [ "arm64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -5467,12 +5440,15 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.19.tgz", - "integrity": "sha512-5xTOE0lDlDCSSfp+BAif7j17VRRCjWp//ZPZy6NI0QpdrhxtQnsZguSx0xAAZ0c9XZLrLLwCe/XVe5YPrRilKw==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.22.tgz", + "integrity": "sha512-iknK80pWlNDnkdSr13bd8mMuG3Z2oTxODwsZHvuMY7caMk77+rBLdHVWsy8v2EVa3ZojJ/+wJX5fnq8va6Gv8A==", "cpu": [ "arm64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -5484,12 +5460,15 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.19.tgz", - "integrity": "sha512-LTxRmMgqqMv05Had879W00Fm53quiJd3Zuz8h1JSNJ3nGSlbZ/7Tjs1tKyScgN3Au3t3MyPsjPlq60fMmSHLsg==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.22.tgz", + "integrity": "sha512-penuEdkwU2OOAiS+n4LE8T/VIoCfAI01QcLZTJ2xc3+l4Q22L/DzURocmI2LU1b+8BMQoLAP1Sze3uYAZT05Bg==", "cpu": [ "x64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -5501,12 +5480,15 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.19.tgz", - "integrity": "sha512-eoNQSpA5PQfB9wBO4RA47MTDXWz1fizy9Y3Z6e4DetYIF3dvjuu8sj7aIGn/bFCU6lnFzTK34NtCaffP4NsQ7Q==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.22.tgz", + "integrity": "sha512-ZM0BKJm3FZ+guG6WT6PcyOLtp6paZ5tngcJC/uUKvLW4Y0TQnnVi1+UGdo8Q6Yxp5gaS82pmC1rD/oFlhkWB3g==", "cpu": [ "x64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -5518,9 +5500,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.19.tgz", - "integrity": "sha512-6UNt2dFuCHOe446sm/Kp69nUe8/wIhnh9bm6Xcqw4qEWCOppLMOvhTBVgvM7invVUNr4SPpP6NOQsACtn2IN9Q==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.22.tgz", + "integrity": "sha512-rY/YaumrZaS0//94BnHLF5VSRp0GFUO4GvXNuoCBb0cGSci96yO+p1JaNL2aq9YZAYv9cuZRziV02x5IQH/wjg==", "cpu": [ "arm64" ], @@ -5535,9 +5517,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.19.tgz", - "integrity": "sha512-PhmojAHyqMne56HBLGu9dhDnHPuFmEjrXSQMM/nW0J6j849lk3ESrVtqNJcCk8CKOV7brpTTbaYAjwKPzKM69w==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.22.tgz", + "integrity": "sha512-s5IA4cyrbR2XK/5NWcu5dp8CfPBiKME+UhvNperia7uQybEgg5+LIhGMiY37WQE4rcI4owsDcU4IVUjLoTuDkA==", "cpu": [ "x64" ], @@ -6841,9 +6823,9 @@ } }, "node_modules/@theguild/components/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -6852,21 +6834,6 @@ "node": ">=10" } }, - "node_modules/@theguild/components/node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/@theguild/prettier-config": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@theguild/prettier-config/-/prettier-config-3.0.1.tgz", @@ -6942,16 +6909,6 @@ "graphql": "14 - 16" } }, - "node_modules/@types/apollo-upload-client/node_modules/graphql": { - "version": "16.14.2", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.14.2.tgz", - "integrity": "sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" - } - }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -8674,18 +8631,6 @@ "node": ">=14.0.0" } }, - "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/runtime": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", @@ -8697,17 +8642,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", @@ -9993,9 +9927,9 @@ } }, "node_modules/bob-the-bundler/node_modules/fs-extra": { - "version": "11.3.5", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.5.tgz", - "integrity": "sha512-eKpRKAovdpZtR1WopLHxlBWvAgPny3c4gX1G5Jhwmmw4XJj0ifSD5qB5TOo8hmA0wlRKDAOAhEE1yVPgs6Fgcg==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.4.0.tgz", + "integrity": "sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==", "dev": true, "license": "MIT", "dependencies": { @@ -10099,16 +10033,16 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.8.tgz", + "integrity": "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/braces": { @@ -10641,16 +10575,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -11488,12 +11412,6 @@ "d3-path": "1" } }, - "node_modules/d3-sankey/node_modules/internmap": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", - "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", - "license": "ISC" - }, "node_modules/d3-scale": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", @@ -12450,9 +12368,9 @@ } }, "node_modules/eslint-compat-utils/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -12646,9 +12564,9 @@ "license": "MIT" }, "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", "dev": true, "license": "MIT", "dependencies": { @@ -12739,9 +12657,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -12808,9 +12726,9 @@ "license": "MIT" }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", "dev": true, "license": "MIT", "dependencies": { @@ -13956,9 +13874,9 @@ "license": "MIT" }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz", - "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz", + "integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==", "dev": true, "license": "MIT", "dependencies": { @@ -14067,12 +13985,12 @@ "license": "ISC" }, "node_modules/graphql": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.14.0.tgz", - "integrity": "sha512-BBvQ/406p+4CZbTpCbVPSxfzrZrbnuWSP1ELYgyS6B+hNeKzgrdB4JczCa5VZUBQrDa9hUngm0KnexY6pJRN5Q==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-17.0.2.tgz", + "integrity": "sha512-FRWbddMxfkjiB7z+aQDWIR+E34xo9I8c9mtK2RPv8PmMzKRvrdsreHL/Ui/TmwHJfhHChEtsFPyMHKI+xuarQQ==", "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + "node": "^22.0.0 || ^24.0.0 || ^25.0.0 || >=26.0.0" } }, "node_modules/graphql-scalars": { @@ -14108,9 +14026,9 @@ } }, "node_modules/graphql-tag": { - "version": "2.12.6", - "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", - "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "version": "2.12.7", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.7.tgz", + "integrity": "sha512-xnE/NFzy+0eIesvAsREJZ284zTl/wYuBAvpsFSDhRGRdRHdnE90M21Q3xAWyYInb0J756c6x0pIQ62+vtvOs1Q==", "license": "MIT", "dependencies": { "tslib": "^2.1.0" @@ -14119,7 +14037,7 @@ "node": ">=10" }, "peerDependencies": { - "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "node_modules/graphql-tools": { @@ -14735,9 +14653,9 @@ } }, "node_modules/iconv-lite": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", - "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", "dev": true, "license": "MIT", "dependencies": { @@ -14752,9 +14670,9 @@ } }, "node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", "dev": true, "license": "MIT", "engines": { @@ -14872,13 +14790,10 @@ } }, "node_modules/internmap": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", - "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", - "license": "ISC", - "engines": { - "node": ">=12" - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", + "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", + "license": "ISC" }, "node_modules/invariant": { "version": "2.2.4", @@ -15127,6 +15042,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-generator-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", @@ -15573,9 +15498,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -16311,9 +16236,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -17143,9 +17068,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -18813,13 +18738,13 @@ "license": "MIT" }, "node_modules/next": { - "version": "15.5.19", - "resolved": "https://registry.npmjs.org/next/-/next-15.5.19.tgz", - "integrity": "sha512-xNOW6tYshGX1/Oi3F8uuk4gpDeWsSUE/1Z0G5uUMekIxaQ0xc03UXd9II0VQHYMWviMeA0OHpJFAKsHf8bTYVg==", + "version": "15.5.22", + "resolved": "https://registry.npmjs.org/next/-/next-15.5.22.tgz", + "integrity": "sha512-mrtal1sRxO4YrlDS98sDuIvGZivKbFix8w7oAL9ZynfOgc3cADQOQgvwtMooc18Qr8bKzvQAcHwHZ0mbJ7zcfQ==", "license": "MIT", "peer": true, "dependencies": { - "@next/env": "15.5.19", + "@next/env": "15.5.22", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", @@ -18832,14 +18757,14 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.5.19", - "@next/swc-darwin-x64": "15.5.19", - "@next/swc-linux-arm64-gnu": "15.5.19", - "@next/swc-linux-arm64-musl": "15.5.19", - "@next/swc-linux-x64-gnu": "15.5.19", - "@next/swc-linux-x64-musl": "15.5.19", - "@next/swc-win32-arm64-msvc": "15.5.19", - "@next/swc-win32-x64-msvc": "15.5.19", + "@next/swc-darwin-arm64": "15.5.22", + "@next/swc-darwin-x64": "15.5.22", + "@next/swc-linux-arm64-gnu": "15.5.22", + "@next/swc-linux-arm64-musl": "15.5.22", + "@next/swc-linux-x64-gnu": "15.5.22", + "@next/swc-linux-x64-musl": "15.5.22", + "@next/swc-win32-arm64-msvc": "15.5.22", + "@next/swc-win32-x64-msvc": "15.5.22", "sharp": "^0.34.3" }, "peerDependencies": { @@ -19715,9 +19640,9 @@ } }, "node_modules/patch-package/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -19914,9 +19839,9 @@ } }, "node_modules/postcss": { - "version": "8.5.20", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.20.tgz", - "integrity": "sha512-lW616l85ucIQL+FocMmL7pQFPqBmwejrCMg+iPxyImlrANNJG9NHq/RkyCZopDhd8C3LA03PHRJDjkbGu8vvug==", + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", + "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", "funding": [ { "type": "opencollective", @@ -19933,7 +19858,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.16", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -20631,9 +20556,9 @@ } }, "node_modules/read-yaml-file/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz", + "integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==", "dev": true, "license": "MIT", "dependencies": { @@ -21703,9 +21628,9 @@ } }, "node_modules/sharp/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "devOptional": true, "license": "ISC", "bin": { @@ -22123,16 +22048,6 @@ "dev": true, "license": "MIT" }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/string-width/node_modules/ansi-regex": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", @@ -22371,9 +22286,9 @@ "license": "MIT" }, "node_modules/subscriptions-transport-ws/node_modules/ws": { - "version": "7.5.11", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.11.tgz", - "integrity": "sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA==", + "version": "7.5.13", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz", + "integrity": "sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==", "devOptional": true, "license": "MIT", "engines": { @@ -22700,9 +22615,9 @@ "license": "MIT" }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", + "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -22989,9 +22904,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -23584,9 +23499,9 @@ } }, "node_modules/unist-util-visit": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", - "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", @@ -23977,9 +23892,9 @@ } }, "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.5.11", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.11.tgz", - "integrity": "sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA==", + "version": "7.5.13", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz", + "integrity": "sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==", "license": "MIT", "engines": { "node": ">=8.3.0" @@ -24297,16 +24212,6 @@ "dev": true, "license": "MIT" }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi-cjs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -24448,9 +24353,9 @@ } }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", "dev": true, "license": "MIT", "dependencies": { @@ -24483,16 +24388,6 @@ "dev": true, "license": "MIT" }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -24645,7 +24540,7 @@ }, "devDependencies": { "cross-inspect": "1.0.1", - "graphql": "^16.14.0" + "graphql": "^17.0.2" }, "engines": { "node": ">=16.0.0" @@ -24670,7 +24565,7 @@ }, "peerDependencies": { "@apollo/client": "^4.0.4", - "graphql": "^15.2.0 || ^16.0.0" + "graphql": "^15.2.0 || ^16.0.0 || ^17.0.0" } }, "packages/executors/envelop": { @@ -24749,7 +24644,7 @@ }, "peerDependencies": { "@urql/core": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", - "graphql": "^15.2.0 || ^16.0.0", + "graphql": "^15.2.0 || ^16.0.0 || ^17.0.0", "wonka": "^6.0.0" } }, @@ -24955,22 +24850,6 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "packages/load/node_modules/graphql-tag": { - "version": "2.12.7", - "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.7.tgz", - "integrity": "sha512-xnE/NFzy+0eIesvAsREJZ284zTl/wYuBAvpsFSDhRGRdRHdnE90M21Q3xAWyYInb0J756c6x0pIQ62+vtvOs1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, "packages/load/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", diff --git a/package.json b/package.json index 032e5dca6b3..d36edab06b4 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "eslint-plugin-n": "18.2.2", "eslint-plugin-promise": "7.3.0", "globby": "11.1.0", - "graphql": "16.14.0", + "graphql": "17.0.2", "graphql-yoga": "5.21.2", "husky": "9.1.7", "jest": "30.4.2", @@ -102,13 +102,14 @@ "wonka": "6.3.6" }, "overrides": { + "@n1ru4l/in-memory-live-query-store": "0.11.0", "cookie": "2.0.1", "esbuild": "0.28.1", "estree-util-value-to-estree": "3.5.0", "extract-zip": { "yauzl": "3.3.0" }, - "graphql": "16.14.0", + "graphql": "17.0.2", "miniflare": { "undici": "8.7.0" }, diff --git a/packages/executor/package.json b/packages/executor/package.json index 815dc5a9b38..79f6bd61f72 100644 --- a/packages/executor/package.json +++ b/packages/executor/package.json @@ -64,7 +64,7 @@ }, "devDependencies": { "cross-inspect": "1.0.1", - "graphql": "^16.14.0" + "graphql": "^17.0.2" }, "publishConfig": { "directory": "dist", diff --git a/packages/executor/src/execution/__tests__/executor-test.ts b/packages/executor/src/execution/__tests__/executor-test.ts index 7df74a0ed5b..987d10166d0 100644 --- a/packages/executor/src/execution/__tests__/executor-test.ts +++ b/packages/executor/src/execution/__tests__/executor-test.ts @@ -13,6 +13,7 @@ import { GraphQLUnionType, Kind, parse, + versionInfo, } from 'graphql'; import { expectJSON } from '../../__testUtils__/expectJSON.js'; import { resolveOnNextTick } from '../../__testUtils__/resolveOnNextTick.js'; @@ -207,6 +208,8 @@ describe('Execute: Handles basic execution tasks', () => { 'operation', 'variableValues', 'signal', + 'getAbortSignal', + 'getAsyncHelpers', ]); const operation = document.definitions[0]; @@ -226,7 +229,7 @@ describe('Execute: Handles basic execution tasks', () => { expect(resolvedInfo).toMatchObject({ fieldNodes: [field], path: { prev: undefined, key: 'result', typename: 'Test' }, - variableValues: { var: 'abc' }, + variableValues: versionInfo.major >= 17 ? { coerced: { var: 'abc' } } : { var: 'abc' }, }); }); diff --git a/packages/executor/src/execution/__tests__/oneOf-test.ts b/packages/executor/src/execution/__tests__/oneOf-test.ts index 59709ad87ec..c3d504dfa76 100644 --- a/packages/executor/src/execution/__tests__/oneOf-test.ts +++ b/packages/executor/src/execution/__tests__/oneOf-test.ts @@ -72,17 +72,10 @@ if (versionInfo.major !== 16) { const result = executeQuery(query, rootValue); expectJSON(result).toDeepEqual({ - data: { - test: null, - }, errors: [ { - locations: [{ column: 23, line: 3 }], - message: - // This type of error would be caught at validation-time - // hence the vague error message here. - 'Argument "input" of non-null type "TestInputObject!" must not be null.', - path: ['test'], + locations: [{ column: 43, line: 2 }], + message: 'Variable "$input" has invalid default value.', }, ], }); diff --git a/packages/executor/src/execution/__tests__/variables-test.ts b/packages/executor/src/execution/__tests__/variables-test.ts index c4abdd4f3ec..504dc0c5c62 100644 --- a/packages/executor/src/execution/__tests__/variables-test.ts +++ b/packages/executor/src/execution/__tests__/variables-test.ts @@ -418,7 +418,9 @@ describe('Execute: Handles inputs', () => { errors: [ { message: - 'Variable "$input" got invalid value null at "input.c"; Expected non-nullable type "String!" not to be null.', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value null at "input.c"; Expected value of non-null type "String!" not to be null.' + : 'Variable "$input" got invalid value null at "input.c"; Expected non-nullable type "String!" not to be null.', locations: [{ line: 2, column: 16 }], }, ], @@ -432,7 +434,9 @@ describe('Execute: Handles inputs', () => { errors: [ { message: - 'Variable "$input" got invalid value "foo bar"; Expected type "TestInputObject" to be an object.', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value "foo bar"; Expected value of type "TestInputObject" to be an object, found: "foo bar".' + : 'Variable "$input" got invalid value "foo bar"; Expected type "TestInputObject" to be an object.', locations: [{ line: 2, column: 16 }], }, ], @@ -446,7 +450,9 @@ describe('Execute: Handles inputs', () => { errors: [ { message: - 'Variable "$input" got invalid value { a: "foo", b: "bar" }; Field "c" of required type "String!" was not provided.', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value { a: "foo", b: "bar" }; Expected value of type "TestInputObject" to include required field "c", found: { a: "foo", b: "bar" }.' + : 'Variable "$input" got invalid value { a: "foo", b: "bar" }; Field "c" of required type "String!" was not provided.', locations: [{ line: 2, column: 16 }], }, ], @@ -465,12 +471,16 @@ describe('Execute: Handles inputs', () => { errors: [ { message: - 'Variable "$input" got invalid value { a: "foo" } at "input.na"; Field "c" of required type "String!" was not provided.', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value { a: "foo" } at "input.na"; Expected value of type "TestInputObject" to include required field "c", found: { a: "foo" }.' + : 'Variable "$input" got invalid value { a: "foo" } at "input.na"; Field "c" of required type "String!" was not provided.', locations: [{ line: 2, column: 18 }], }, { message: - 'Variable "$input" got invalid value { na: { a: "foo" } }; Field "nb" of required type "String!" was not provided.', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value { na: { a: "foo" } }; Expected value of type "TestNestedInputObject" to include required field "nb", found: { na: { a: "foo" } }.' + : 'Variable "$input" got invalid value { na: { a: "foo" } }; Field "nb" of required type "String!" was not provided.', locations: [{ line: 2, column: 18 }], }, ], @@ -487,7 +497,9 @@ describe('Execute: Handles inputs', () => { errors: [ { message: - 'Variable "$input" got invalid value { a: "foo", b: "bar", c: "baz", extra: "dog" }; Field "extra" is not defined by type "TestInputObject".', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value { a: "foo", b: "bar", c: "baz", extra: "dog" }; Expected value of type "TestInputObject" not to include unknown field "extra", found: { a: "foo", b: "bar", c: "baz", extra: "dog" }.' + : 'Variable "$input" got invalid value { a: "foo", b: "bar", c: "baz", extra: "dog" }; Field "extra" is not defined by type "TestInputObject".', locations: [{ line: 2, column: 16 }], }, ], @@ -889,7 +901,9 @@ describe('Execute: Handles inputs', () => { errors: [ { message: - 'Variable "$input" got invalid value null at "input[1]"; Expected non-nullable type "String!" not to be null.', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value null at "input[1]"; Expected value of non-null type "String!" not to be null.' + : 'Variable "$input" got invalid value null at "input[1]"; Expected non-nullable type "String!" not to be null.', locations: [{ line: 2, column: 16 }], }, ], @@ -937,7 +951,9 @@ describe('Execute: Handles inputs', () => { errors: [ { message: - 'Variable "$input" got invalid value null at "input[1]"; Expected non-nullable type "String!" not to be null.', + versionInfo.major >= 17 + ? 'Variable "$input" got invalid value null at "input[1]"; Expected value of non-null type "String!" not to be null.' + : 'Variable "$input" got invalid value null at "input[1]"; Expected non-nullable type "String!" not to be null.', locations: [{ line: 2, column: 16 }], }, ], diff --git a/packages/executor/src/execution/execute.ts b/packages/executor/src/execution/execute.ts index 2a10e0c1d28..91271e072e5 100644 --- a/packages/executor/src/execution/execute.ts +++ b/packages/executor/src/execution/execute.ts @@ -51,6 +51,7 @@ import { Path, pathToArray, promiseReduce, + toGraphQLJSVariableValues, } from '@graphql-tools/utils'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { DisposableSymbols } from '@whatwg-node/disposablestack'; @@ -816,7 +817,8 @@ export function buildResolveInfo( ): GraphQLResolveInfo { // The resolve function's optional fourth argument is a collection of // information about the current execution state. - return { + const { signal } = exeContext; + const info = { fieldName: fieldDef.name, fieldNodes, returnType: fieldDef.type, @@ -826,9 +828,29 @@ export function buildResolveInfo( fragments: exeContext.fragments, rootValue: exeContext.rootValue, operation: exeContext.operation, - variableValues: exeContext.variableValues, - signal: exeContext.signal, + // graphql-js >= 17's `GraphQLResolveInfo.variableValues` is the structured + // `{ coerced, sources }` shape, not the flat map this package uses internally. + variableValues: toGraphQLJSVariableValues(exeContext.variableValues), + signal, + getAbortSignal: () => signal, + getAsyncHelpers: () => ({ + promiseAll: (values: ReadonlyArray | T>) => Promise.all(values), + // graphql-js >= 17's real `track()` registers background promises. This + // package doesn't implement graphql-js's optional `asyncWorkFinished` hook, + // so mirror just that safety property instead of building out the full hook feature. + track: (maybePromises: ReadonlyArray) => { + for (const maybePromise of maybePromises) { + if (isPromise(maybePromise)) { + Promise.resolve(maybePromise).then( + () => {}, + () => {}, + ); + } + } + }, + }), }; + return info; } export const CRITICAL_ERROR = 'CRITICAL_ERROR' as const; @@ -989,7 +1011,7 @@ function getStreamValues( const stream = getDirectiveValues( GraphQLStreamDirective, fieldNodes[0], - exeContext.variableValues, + toGraphQLJSVariableValues(exeContext.variableValues), ) as { initialCount: number; label: string; diff --git a/packages/executor/src/execution/values.ts b/packages/executor/src/execution/values.ts index 7e085fdcc24..9d2f787a1e0 100644 --- a/packages/executor/src/execution/values.ts +++ b/packages/executor/src/execution/values.ts @@ -10,7 +10,34 @@ import { valueFromAST, VariableDefinitionNode, } from 'graphql'; -import { createGraphQLError, hasOwnProperty, inspect, printPathArray } from '@graphql-tools/utils'; +import { + createGraphQLError, + getOptionalGraphQLJSExport, + hasOwnProperty, + inspect, + printPathArray, +} from '@graphql-tools/utils'; + +// `validateInputValue` was introduced in graphql-js@17, replacing the `onError` +// callback that `coerceInputValue` used to accept. +const validateInputValue = getOptionalGraphQLJSExport('validateInputValue'); + +// `coerceInputLiteral` was introduced in graphql-js@17. Unlike `valueFromAST`, it +// correctly rejects AST literals whose kind doesn't match the target type (e.g. an +// enum literal provided for a String variable default), which `valueFromAST` +// stopped doing in graphql-js@17. See the same pattern in getArgumentValues.ts. +const coerceInputLiteral = getOptionalGraphQLJSExport('coerceInputLiteral'); + +function getAtPath(value: unknown, path: ReadonlyArray): unknown { + let current = value; + for (const key of path) { + if (current == null || typeof current !== 'object' || !hasOwnProperty(current, String(key))) { + return undefined; + } + current = (current as Record)[key]; + } + return current; +} type CoercedVariableValues = | { errors: ReadonlyArray; coerced?: never } @@ -78,7 +105,22 @@ function coerceVariableValues( if (!hasOwnProperty(inputs, varName)) { if (varDefNode.defaultValue) { - coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType); + const coercedDefaultValue = coerceInputLiteral + ? coerceInputLiteral(varDefNode.defaultValue, varType) + : valueFromAST(varDefNode.defaultValue, varType); + if (coercedDefaultValue === undefined) { + // Schema/document validation should catch an invalid default value + // before execution; this mirrors graphql-js's own + // `coerceDefaultValue`/`maybeUseDefaultValue`, which report this + // case as an error rather than silently producing `undefined`. + onError( + createGraphQLError(`Variable "$${varName}" has invalid default value.`, { + nodes: varDefNode.defaultValue, + }), + ); + } else { + coercedValues[varName] = coercedDefaultValue; + } } else if (isNonNullType(varType)) { const varTypeStr = inspect(varType); onError( @@ -107,8 +149,8 @@ function coerceVariableValues( continue; } - coercedValues[varName] = coerceInputValue(value, varType, (path, invalidValue, error) => { - let prefix = `Variable "$${varName}" got invalid value ` + inspect(invalidValue); + const reportInvalidValue = (path: ReadonlyArray, error: GraphQLError) => { + let prefix = `Variable "$${varName}" got invalid value ` + inspect(getAtPath(value, path)); if (path.length > 0) { prefix += ` at "${varName}${printPathArray(path)}"`; } @@ -118,7 +160,25 @@ function coerceVariableValues( originalError: error, }), ); - }); + }; + + if (validateInputValue) { + // graphql-js >= 17: `coerceInputValue` no longer reports diagnostics via a + // callback, so fall back to `validateInputValue` when coercion fails. + const coercedValue = coerceInputValue(value, varType); + if (coercedValue !== undefined) { + coercedValues[varName] = coercedValue; + } else { + validateInputValue(value, varType, (error, path) => reportInvalidValue(path, error)); + } + } else { + coercedValues[varName] = (coerceInputValue as any)( + value, + varType, + (path: ReadonlyArray, _invalidValue: unknown, error: GraphQLError) => + reportInvalidValue(path, error), + ); + } } return coercedValues; diff --git a/packages/executors/apollo-link/package.json b/packages/executors/apollo-link/package.json index 0bded6d05dd..c59c0628939 100644 --- a/packages/executors/apollo-link/package.json +++ b/packages/executors/apollo-link/package.json @@ -49,7 +49,7 @@ "typings": "dist/typings/index.d.ts", "peerDependencies": { "@apollo/client": "^4.0.4", - "graphql": "^15.2.0 || ^16.0.0" + "graphql": "^15.2.0 || ^16.0.0 || ^17.0.0" }, "dependencies": { "@graphql-tools/utils": "^11.2.2", diff --git a/packages/executors/urql-exchange/package.json b/packages/executors/urql-exchange/package.json index 60245405d45..42ce53cd0e8 100644 --- a/packages/executors/urql-exchange/package.json +++ b/packages/executors/urql-exchange/package.json @@ -44,7 +44,7 @@ }, "peerDependencies": { "@urql/core": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", - "graphql": "^15.2.0 || ^16.0.0", + "graphql": "^15.2.0 || ^16.0.0 || ^17.0.0", "wonka": "^6.0.0" }, "dependencies": { diff --git a/packages/loaders/git/tests/loader.spec.ts b/packages/loaders/git/tests/loader.spec.ts index 98cd8398f84..0e130ff999f 100644 --- a/packages/loaders/git/tests/loader.spec.ts +++ b/packages/loaders/git/tests/loader.spec.ts @@ -1,8 +1,11 @@ import { execSync } from 'child_process'; import * as path from 'path'; +import { versionInfo } from 'graphql'; import { runTests } from '../../../testing/utils.js'; import { GitLoader } from '../src/index.js'; +const emptyList = versionInfo.major >= 17 ? undefined : []; + describe('GitLoader', () => { const loader = new GitLoader(); const lastCommit = execSync('git rev-parse HEAD', { encoding: 'utf-8' }).replace(/\n/g, ''); @@ -55,12 +58,12 @@ describe('GitLoader', () => { definitions: [ { description: undefined, - directives: [], + directives: emptyList, fields: [ { - arguments: [], + arguments: emptyList, description: undefined, - directives: [], + directives: emptyList, kind: 'FieldDefinition', loc: { end: 28, @@ -91,7 +94,7 @@ describe('GitLoader', () => { }, }, ], - interfaces: [], + interfaces: emptyList, kind: 'ObjectTypeDefinition', loc: { end: 30, @@ -135,12 +138,12 @@ describe('GitLoader', () => { definitions: [ { description: undefined, - directives: [], + directives: emptyList, fields: [ { - arguments: [], + arguments: emptyList, description: undefined, - directives: [], + directives: emptyList, kind: 'FieldDefinition', loc: { end: 28, @@ -171,7 +174,7 @@ describe('GitLoader', () => { }, }, ], - interfaces: [], + interfaces: emptyList, kind: 'ObjectTypeDefinition', loc: { end: 30, diff --git a/packages/optimize/tests/remove-empty-nodes.spec.ts b/packages/optimize/tests/remove-empty-nodes.spec.ts index 8c04f98e4b7..5d02a3d2fb2 100644 --- a/packages/optimize/tests/remove-empty-nodes.spec.ts +++ b/packages/optimize/tests/remove-empty-nodes.spec.ts @@ -1,4 +1,4 @@ -import { DocumentNode, parse, print, visit } from 'graphql'; +import { DocumentNode, parse, print, versionInfo, visit } from 'graphql'; import { removeEmptyNodes } from '../src/index.js'; describe('removeEmptyNodes', () => { @@ -60,7 +60,9 @@ describe('removeEmptyNodes', () => { const out = removeEmptyNodes(doc); const stringOut = JSON.stringify(normalizeAcrossGraphQLVersions(out)); expect(stringOut).toBe( - `{"kind":"Document","definitions":[{"kind":"SchemaDefinition","operationTypes":[{"kind":"OperationTypeDefinition","operation":"query","type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":31,"end":34}},"loc":{"start":31,"end":34}},"loc":{"start":24,"end":34}}],"loc":{"start":7,"end":42}},{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":56,"end":59}},"loc":{"start":49,"end":59}},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":71,"end":74}},"interfaces":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":85,"end":88}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":90,"end":93}},"loc":{"start":90,"end":93}},"loc":{"start":85,"end":93}}],"loc":{"start":66,"end":101}},{"kind":"InterfaceTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":118,"end":121}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":132,"end":135}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":137,"end":140}},"loc":{"start":137,"end":140}},"loc":{"start":132,"end":140}}],"loc":{"start":108,"end":148}},{"kind":"UnionTypeDefinition","name":{"kind":"Name","value":"FooBar","loc":{"start":161,"end":167}},"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":170,"end":173}},"loc":{"start":170,"end":173}},{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":176,"end":179}},"loc":{"start":176,"end":179}}],"loc":{"start":155,"end":179}},{"kind":"EnumTypeDefinition","name":{"kind":"Name","value":"FooBar","loc":{"start":191,"end":197}},"values":[{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"FOO","loc":{"start":208,"end":211}},"loc":{"start":208,"end":211}},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"BAR","loc":{"start":220,"end":223}},"loc":{"start":220,"end":223}}],"loc":{"start":186,"end":231}},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":244,"end":247}},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"bar","loc":{"start":258,"end":261}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":263,"end":266}},"loc":{"start":263,"end":266}},"loc":{"start":258,"end":266}}],"loc":{"start":238,"end":274}},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Bar","loc":{"start":286,"end":289}},"interfaces":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":300,"end":303}},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"foo","loc":{"start":304,"end":307}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":309,"end":312}},"loc":{"start":309,"end":312}},"loc":{"start":304,"end":312}}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":315,"end":318}},"loc":{"start":315,"end":318}},"loc":{"start":300,"end":318}}],"loc":{"start":281,"end":326}}],"loc":{"start":0,"end":331}}`, + versionInfo.major >= 17 + ? `{"kind":"Document","definitions":[{"kind":"SchemaDefinition","operationTypes":[{"kind":"OperationTypeDefinition","operation":"query","type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":31,"end":34}},"loc":{"start":31,"end":34}},"loc":{"start":24,"end":34}}],"loc":{"start":7,"end":42}},{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":56,"end":59}},"loc":{"start":49,"end":59}},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":71,"end":74}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":85,"end":88}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":90,"end":93}},"loc":{"start":90,"end":93}},"loc":{"start":85,"end":93}}],"loc":{"start":66,"end":101}},{"kind":"InterfaceTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":118,"end":121}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":132,"end":135}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":137,"end":140}},"loc":{"start":137,"end":140}},"loc":{"start":132,"end":140}}],"loc":{"start":108,"end":148}},{"kind":"UnionTypeDefinition","name":{"kind":"Name","value":"FooBar","loc":{"start":161,"end":167}},"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":170,"end":173}},"loc":{"start":170,"end":173}},{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":176,"end":179}},"loc":{"start":176,"end":179}}],"loc":{"start":155,"end":179}},{"kind":"EnumTypeDefinition","name":{"kind":"Name","value":"FooBar","loc":{"start":191,"end":197}},"values":[{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"FOO","loc":{"start":208,"end":211}},"loc":{"start":208,"end":211}},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"BAR","loc":{"start":220,"end":223}},"loc":{"start":220,"end":223}}],"loc":{"start":186,"end":231}},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":244,"end":247}},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"bar","loc":{"start":258,"end":261}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":263,"end":266}},"loc":{"start":263,"end":266}},"loc":{"start":258,"end":266}}],"loc":{"start":238,"end":274}},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Bar","loc":{"start":286,"end":289}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":300,"end":303}},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"foo","loc":{"start":304,"end":307}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":309,"end":312}},"loc":{"start":309,"end":312}},"loc":{"start":304,"end":312}}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":315,"end":318}},"loc":{"start":315,"end":318}},"loc":{"start":300,"end":318}}],"loc":{"start":281,"end":326}}],"loc":{"start":0,"end":331}}` + : `{"kind":"Document","definitions":[{"kind":"SchemaDefinition","operationTypes":[{"kind":"OperationTypeDefinition","operation":"query","type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":31,"end":34}},"loc":{"start":31,"end":34}},"loc":{"start":24,"end":34}}],"loc":{"start":7,"end":42}},{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":56,"end":59}},"loc":{"start":49,"end":59}},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":71,"end":74}},"interfaces":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":85,"end":88}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":90,"end":93}},"loc":{"start":90,"end":93}},"loc":{"start":85,"end":93}}],"loc":{"start":66,"end":101}},{"kind":"InterfaceTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":118,"end":121}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":132,"end":135}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":137,"end":140}},"loc":{"start":137,"end":140}},"loc":{"start":132,"end":140}}],"loc":{"start":108,"end":148}},{"kind":"UnionTypeDefinition","name":{"kind":"Name","value":"FooBar","loc":{"start":161,"end":167}},"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":170,"end":173}},"loc":{"start":170,"end":173}},{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":176,"end":179}},"loc":{"start":176,"end":179}}],"loc":{"start":155,"end":179}},{"kind":"EnumTypeDefinition","name":{"kind":"Name","value":"FooBar","loc":{"start":191,"end":197}},"values":[{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"FOO","loc":{"start":208,"end":211}},"loc":{"start":208,"end":211}},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"BAR","loc":{"start":220,"end":223}},"loc":{"start":220,"end":223}}],"loc":{"start":186,"end":231}},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"Foo","loc":{"start":244,"end":247}},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"bar","loc":{"start":258,"end":261}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":263,"end":266}},"loc":{"start":263,"end":266}},"loc":{"start":258,"end":266}}],"loc":{"start":238,"end":274}},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Bar","loc":{"start":286,"end":289}},"interfaces":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":300,"end":303}},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"foo","loc":{"start":304,"end":307}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":309,"end":312}},"loc":{"start":309,"end":312}},"loc":{"start":304,"end":312}}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":315,"end":318}},"loc":{"start":315,"end":318}},"loc":{"start":300,"end":318}}],"loc":{"start":281,"end":326}}],"loc":{"start":0,"end":331}}`, ); expect(stringOut).not.toContain(`"arguments":[]`); expect(stringOut).not.toContain(`"directives":[]`); @@ -91,7 +93,9 @@ describe('removeEmptyNodes', () => { const out = removeEmptyNodes(doc); const stringOut = JSON.stringify(normalizeAcrossGraphQLVersions(out)); expect(stringOut).toBe( - `{"kind":"Document","definitions":[{"kind":"SchemaExtension","operationTypes":[{"kind":"OperationTypeDefinition","operation":"query","type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":38,"end":41}},"loc":{"start":38,"end":41}},"loc":{"start":31,"end":41}}],"loc":{"start":7,"end":49}},{"kind":"ScalarTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":70,"end":73}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"foo","loc":{"start":75,"end":78}},"loc":{"start":74,"end":78}}],"loc":{"start":56,"end":78}},{"kind":"ObjectTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":97,"end":100}},"interfaces":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":111,"end":114}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":116,"end":119}},"loc":{"start":116,"end":119}},"loc":{"start":111,"end":119}}],"loc":{"start":85,"end":127}},{"kind":"InterfaceTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":151,"end":154}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":165,"end":168}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":170,"end":173}},"loc":{"start":170,"end":173}},"loc":{"start":165,"end":173}}],"loc":{"start":134,"end":181}},{"kind":"UnionTypeExtension","name":{"kind":"Name","value":"FooBar","loc":{"start":201,"end":207}},"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":210,"end":213}},"loc":{"start":210,"end":213}},{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":216,"end":219}},"loc":{"start":216,"end":219}}],"loc":{"start":188,"end":219}},{"kind":"EnumTypeExtension","name":{"kind":"Name","value":"FooBar","loc":{"start":238,"end":244}},"values":[{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"FOO","loc":{"start":255,"end":258}},"loc":{"start":255,"end":258}},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"BAR","loc":{"start":267,"end":270}},"loc":{"start":267,"end":270}}],"loc":{"start":226,"end":278}},{"kind":"InputObjectTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":298,"end":301}},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"bar","loc":{"start":312,"end":315}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":317,"end":320}},"loc":{"start":317,"end":320}},"loc":{"start":312,"end":320}}],"loc":{"start":285,"end":328}}],"loc":{"start":0,"end":333}}`, + versionInfo.major >= 17 + ? `{"kind":"Document","definitions":[{"kind":"SchemaExtension","operationTypes":[{"kind":"OperationTypeDefinition","operation":"query","type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":38,"end":41}},"loc":{"start":38,"end":41}},"loc":{"start":31,"end":41}}],"loc":{"start":7,"end":49}},{"kind":"ScalarTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":70,"end":73}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"foo","loc":{"start":75,"end":78}},"loc":{"start":74,"end":78}}],"loc":{"start":56,"end":78}},{"kind":"ObjectTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":97,"end":100}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":111,"end":114}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":116,"end":119}},"loc":{"start":116,"end":119}},"loc":{"start":111,"end":119}}],"loc":{"start":85,"end":127}},{"kind":"InterfaceTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":151,"end":154}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":165,"end":168}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":170,"end":173}},"loc":{"start":170,"end":173}},"loc":{"start":165,"end":173}}],"loc":{"start":134,"end":181}},{"kind":"UnionTypeExtension","name":{"kind":"Name","value":"FooBar","loc":{"start":201,"end":207}},"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":210,"end":213}},"loc":{"start":210,"end":213}},{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":216,"end":219}},"loc":{"start":216,"end":219}}],"loc":{"start":188,"end":219}},{"kind":"EnumTypeExtension","name":{"kind":"Name","value":"FooBar","loc":{"start":238,"end":244}},"values":[{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"FOO","loc":{"start":255,"end":258}},"loc":{"start":255,"end":258}},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"BAR","loc":{"start":267,"end":270}},"loc":{"start":267,"end":270}}],"loc":{"start":226,"end":278}},{"kind":"InputObjectTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":298,"end":301}},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"bar","loc":{"start":312,"end":315}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":317,"end":320}},"loc":{"start":317,"end":320}},"loc":{"start":312,"end":320}}],"loc":{"start":285,"end":328}}],"loc":{"start":0,"end":333}}` + : `{"kind":"Document","definitions":[{"kind":"SchemaExtension","operationTypes":[{"kind":"OperationTypeDefinition","operation":"query","type":{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":38,"end":41}},"loc":{"start":38,"end":41}},"loc":{"start":31,"end":41}}],"loc":{"start":7,"end":49}},{"kind":"ScalarTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":70,"end":73}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"foo","loc":{"start":75,"end":78}},"loc":{"start":74,"end":78}}],"loc":{"start":56,"end":78}},{"kind":"ObjectTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":97,"end":100}},"interfaces":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":111,"end":114}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":116,"end":119}},"loc":{"start":116,"end":119}},"loc":{"start":111,"end":119}}],"loc":{"start":85,"end":127}},{"kind":"InterfaceTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":151,"end":154}},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"bar","loc":{"start":165,"end":168}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":170,"end":173}},"loc":{"start":170,"end":173}},"loc":{"start":165,"end":173}}],"loc":{"start":134,"end":181}},{"kind":"UnionTypeExtension","name":{"kind":"Name","value":"FooBar","loc":{"start":201,"end":207}},"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Foo","loc":{"start":210,"end":213}},"loc":{"start":210,"end":213}},{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":216,"end":219}},"loc":{"start":216,"end":219}}],"loc":{"start":188,"end":219}},{"kind":"EnumTypeExtension","name":{"kind":"Name","value":"FooBar","loc":{"start":238,"end":244}},"values":[{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"FOO","loc":{"start":255,"end":258}},"loc":{"start":255,"end":258}},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"BAR","loc":{"start":267,"end":270}},"loc":{"start":267,"end":270}}],"loc":{"start":226,"end":278}},{"kind":"InputObjectTypeExtension","name":{"kind":"Name","value":"Foo","loc":{"start":298,"end":301}},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"bar","loc":{"start":312,"end":315}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Bar","loc":{"start":317,"end":320}},"loc":{"start":317,"end":320}},"loc":{"start":312,"end":320}}],"loc":{"start":285,"end":328}}],"loc":{"start":0,"end":333}}`, ); expect(stringOut).not.toContain(`"arguments":[]`); expect(stringOut).not.toContain(`"directives":[]`); diff --git a/packages/optimize/tests/remove-loc.spec.ts b/packages/optimize/tests/remove-loc.spec.ts index cd264a28a62..713adb16fd4 100644 --- a/packages/optimize/tests/remove-loc.spec.ts +++ b/packages/optimize/tests/remove-loc.spec.ts @@ -1,4 +1,4 @@ -import { parse, print } from 'graphql'; +import { parse, print, versionInfo } from 'graphql'; import { removeLoc } from '../src/optimizers/remove-loc.js'; describe('removeLoc', () => { @@ -25,7 +25,9 @@ describe('removeLoc', () => { const out = removeLoc(doc); const stringOut = JSON.stringify(out); expect(stringOut).toBe( - `{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"findUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserFields"},"directives":[]}]}}]}},{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"something"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[],"directives":[]}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"username"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"role"},"arguments":[],"directives":[]}]}}]}`, + versionInfo.major >= 17 + ? `{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"findUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserFields"}}]}}]}},{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"something"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}` + : `{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"findUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserFields"},"directives":[]}]}}]}},{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"something"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[],"directives":[]}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"username"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"role"},"arguments":[],"directives":[]}]}}]}`, ); expect(stringOut).not.toContain(`"loc":`); expect(() => print(out)).not.toThrow(); diff --git a/packages/schema/src/addResolversToSchema.ts b/packages/schema/src/addResolversToSchema.ts index 30ef54c125b..60d5e949def 100644 --- a/packages/schema/src/addResolversToSchema.ts +++ b/packages/schema/src/addResolversToSchema.ts @@ -72,9 +72,9 @@ export function addResolversToSchema({ // allow -- without recommending -- overriding of specified scalar types for (const fieldName in resolverValue) { if (fieldName.startsWith('__')) { - type[fieldName.substring(2)] = resolverValue[fieldName]; + setScalarConfigProperty(type, fieldName.substring(2), resolverValue[fieldName]); } else { - type[fieldName] = resolverValue[fieldName]; + setScalarConfigProperty(type, fieldName, resolverValue[fieldName]); } } } else if (isEnumType(type)) { @@ -149,6 +149,30 @@ export function addResolversToSchema({ return schema; } +// graphql-js@17 introduced `coerceOutputValue`/`coerceInputValue` as the methods +// actually invoked during execution, defaulting them from `serialize`/`parseValue` +// only at `GraphQLScalarType` construction time (see graphql-js's own +// `GraphQLScalarType` constructor). Setting `serialize`/`parseValue` on an +// already-built type (or in a config copied via `toConfig()`, which also carries +// forward the old `coerceOutputValue`/`coerceInputValue`) no longer updates what +// execution actually calls, so mirror the assignment onto the new method name too. +const LEGACY_TO_V17_SCALAR_METHOD: Record = { + serialize: 'coerceOutputValue', + parseValue: 'coerceInputValue', +}; + +function setScalarConfigProperty( + target: Record, + propName: string, + value: unknown, +): void { + target[propName] = value; + const v17MethodName = LEGACY_TO_V17_SCALAR_METHOD[propName]; + if (v17MethodName) { + target[v17MethodName] = value; + } +} + function addResolversToExistingSchema( schema: GraphQLSchema, resolvers: IResolvers, @@ -162,7 +186,7 @@ function addResolversToExistingSchema( if (isScalarType(type)) { for (const fieldName in resolverValue) { if (fieldName.startsWith('__')) { - type[fieldName.substring(2)] = resolverValue[fieldName]; + setScalarConfigProperty(type, fieldName.substring(2), resolverValue[fieldName]); } else if (fieldName === 'astNode' && type.astNode != null) { type.astNode = { ...type.astNode, @@ -188,7 +212,7 @@ function addResolversToExistingSchema( (resolverValue as GraphQLScalarType).extensions, ); } else { - type[fieldName] = resolverValue[fieldName]; + setScalarConfigProperty(type, fieldName, resolverValue[fieldName]); } } } else if (isEnumType(type)) { @@ -286,9 +310,15 @@ function createNewSchemaWithResolvers( const config = type.toConfig(); const resolverValue = resolvers[type.name]; if (!isSpecifiedScalarType(type) && resolverValue != null) { + const coerceInputValueOverridden = ['parseValue', 'coerceInputValue'].some( + name => name in resolverValue || `__${name}` in resolverValue, + ); + const parseLiteralOverridden = ['parseLiteral', 'coerceInputLiteral'].some( + name => name in resolverValue || `__${name}` in resolverValue, + ); for (const fieldName in resolverValue) { if (fieldName.startsWith('__')) { - config[fieldName.substring(2)] = resolverValue[fieldName]; + setScalarConfigProperty(config, fieldName.substring(2), resolverValue[fieldName]); } else if (fieldName === 'astNode' && config.astNode != null) { config.astNode = { ...config.astNode, @@ -314,10 +344,14 @@ function createNewSchemaWithResolvers( (resolverValue as GraphQLScalarType).extensions, ); } else { - config[fieldName] = resolverValue[fieldName]; + setScalarConfigProperty(config, fieldName, resolverValue[fieldName]); } } + if (coerceInputValueOverridden && !parseLiteralOverridden) { + delete (config as any).parseLiteral; + } + return new GraphQLScalarType(config); } }, diff --git a/packages/schema/tests/schemaGenerator.test.ts b/packages/schema/tests/schemaGenerator.test.ts index a68f77a058f..9313afcbed1 100644 --- a/packages/schema/tests/schemaGenerator.test.ts +++ b/packages/schema/tests/schemaGenerator.test.ts @@ -15,6 +15,7 @@ import { Kind, parse, VariableDefinitionNode, + versionInfo, } from 'graphql'; import { execute, isIncrementalResult } from '@graphql-tools/executor'; import { addResolversToSchema, chainResolvers, makeExecutableSchema } from '@graphql-tools/schema'; @@ -2027,10 +2028,12 @@ describe('can specify lexical parser options', () => { } `; - const parsedQuery = parse(query, { - experimentalFragmentVariables: true, - allowLegacyFragmentVariables: true, - } as any); + const parsedQuery = parse( + query, + versionInfo.major >= 17 + ? ({ experimentalFragmentArguments: true } as any) + : ({ experimentalFragmentVariables: true, allowLegacyFragmentVariables: true } as any), + ); const hoist = (document: DocumentNode): DocumentNode => { const variableDefs: Array = []; diff --git a/packages/utils/src/collectFields.ts b/packages/utils/src/collectFields.ts index 8646f86040a..64a57e816b2 100644 --- a/packages/utils/src/collectFields.ts +++ b/packages/utils/src/collectFields.ts @@ -15,6 +15,7 @@ import { } from 'graphql'; import { AccumulatorMap } from './AccumulatorMap.js'; import { GraphQLDeferDirective } from './directives.js'; +import { toGraphQLJSVariableValues } from './graphqlJSCompat.js'; import { memoize5 } from './memoize.js'; export interface PatchFields { @@ -179,12 +180,18 @@ export function shouldIncludeNode( variableValues: any, node: FragmentSpreadNode | FieldNode | InlineFragmentNode, ): boolean { - const skip = getDirectiveValues(GraphQLSkipDirective, node, variableValues); + if (!node.directives?.length) { + return true; + } + + const wrappedVariableValues = toGraphQLJSVariableValues(variableValues); + + const skip = getDirectiveValues(GraphQLSkipDirective, node, wrappedVariableValues); if (skip?.['if'] === true) { return false; } - const include = getDirectiveValues(GraphQLIncludeDirective, node, variableValues); + const include = getDirectiveValues(GraphQLIncludeDirective, node, wrappedVariableValues); if (include?.['if'] === false) { return false; } @@ -230,7 +237,15 @@ export function getDeferValues( variableValues: any, node: FragmentSpreadNode | InlineFragmentNode, ): undefined | { label: string | undefined } { - const defer = getDirectiveValues(GraphQLDeferDirective, node, variableValues); + if (!node.directives?.length) { + return; + } + + const defer = getDirectiveValues( + GraphQLDeferDirective, + node, + toGraphQLJSVariableValues(variableValues), + ); if (!defer) { return; diff --git a/packages/utils/src/getArgumentValues.ts b/packages/utils/src/getArgumentValues.ts index 05c3ee60702..c6965afa55b 100644 --- a/packages/utils/src/getArgumentValues.ts +++ b/packages/utils/src/getArgumentValues.ts @@ -12,8 +12,11 @@ import { valueFromASTUntyped, } from 'graphql'; import { createGraphQLError } from './errors.js'; +import { getOptionalGraphQLJSExport, toGraphQLJSVariableValues } from './graphqlJSCompat.js'; import { hasOwnProperty } from './jsutils.js'; +const coerceInputLiteral = getOptionalGraphQLJSExport('coerceInputLiteral'); + /** * Prepares an object map of argument values given a list of argument * definitions and list of argument AST nodes. @@ -38,16 +41,36 @@ export function getArgumentValues( {}, ); + // `variableValues` is loop-invariant; wrap (and memoize) it once instead of + // once per argument, reusing the same graphql-js@17 `{ coerced, sources }` + // shape used for directive-argument coercion elsewhere in this package. + const wrappedVariableValues = toGraphQLJSVariableValues(variableValues); + for (const arg of def.args) { const argumentNode = argNodeMap[arg.name]; if (!argumentNode) { if ('default' in (arg as any) && (arg as any).default) { // graphql v17 - coercedValues[arg.name] = - 'value' in (arg as any).default - ? (arg as any).default.value - : valueFromASTUntyped((arg as any).default.literal); + const defaultInput = (arg as any).default; + if ('value' in defaultInput) { + coercedValues[arg.name] = defaultInput.value; + } else { + const coercedDefaultValue = coerceInputLiteral + ? coerceInputLiteral(defaultInput.literal, arg.type) + : valueFromASTUntyped(defaultInput.literal); + if (coercedDefaultValue === undefined) { + // Schema validation should catch an invalid default value before + // execution; this mirrors graphql-js's own `coerceDefaultValue`, + // which treats this case as an invariant failure rather than + // silently producing `undefined`. + throw createGraphQLError( + `Argument "${arg.name}" has invalid default value ${print(defaultInput.literal)}.`, + { nodes: [defaultInput.literal] }, + ); + } + coercedValues[arg.name] = coercedDefaultValue; + } } else if (arg.defaultValue !== undefined) { // graphql < v17 coercedValues[arg.name] = arg.defaultValue; @@ -93,7 +116,9 @@ export function getArgumentValues( ); } - const coercedValue = valueFromAST(valueNode, arg.type, variableValues); + const coercedValue = coerceInputLiteral + ? coerceInputLiteral(valueNode, arg.type, wrappedVariableValues) + : valueFromAST(valueNode, arg.type, variableValues); if (coercedValue === undefined) { // Note: ValuesOfCorrectTypeRule validation should catch this before // execution. This is a runtime check to ensure execution does not diff --git a/packages/utils/src/getDirectiveExtensions.ts b/packages/utils/src/getDirectiveExtensions.ts index f2bfa9b793d..4b1cde2816f 100644 --- a/packages/utils/src/getDirectiveExtensions.ts +++ b/packages/utils/src/getDirectiveExtensions.ts @@ -1,8 +1,11 @@ import type { ASTNode, DirectiveNode, GraphQLSchema } from 'graphql'; import { valueFromAST, valueFromASTUntyped } from 'graphql'; import { getArgumentValues } from './getArgumentValues.js'; +import { getOptionalGraphQLJSExport } from './graphqlJSCompat.js'; import { memoize1 } from './memoize.js'; +const coerceInputLiteral = getOptionalGraphQLJSExport('coerceInputLiteral'); + export type DirectableASTNode = ASTNode & { directives?: readonly DirectiveNode[] | undefined; }; @@ -89,7 +92,9 @@ export function getDirectiveExtensions< if (value[argName] == null) { const argInDirective = directiveInSchema?.args.find(arg => arg.name === argName); if (argInDirective) { - value[argName] = valueFromAST(argNode.value, argInDirective.type); + value[argName] = coerceInputLiteral + ? coerceInputLiteral(argNode.value, argInDirective.type) + : valueFromAST(argNode.value, argInDirective.type); } } if (value[argName] == null) { diff --git a/packages/utils/src/graphqlJSCompat.ts b/packages/utils/src/graphqlJSCompat.ts new file mode 100644 index 00000000000..8f8b2fb86fe --- /dev/null +++ b/packages/utils/src/graphqlJSCompat.ts @@ -0,0 +1,130 @@ +import { GraphQLScalarType, Kind, versionInfo } from 'graphql'; +// eslint-disable-next-line @typescript-eslint/no-restricted-imports -- namespace import only used for optional access to exports introduced in newer graphql-js versions than this package's supported range, not the restricted names +import * as GraphQLJS from 'graphql'; +import { memoize1 } from './memoize.js'; + +type GraphQLJSModule = typeof import('graphql'); + +// Safe stand-in for graphql-js versions where a given export isn't declared at +// all, so calling the looked-up value as a function still type-checks; the +// runtime feature-detection below is what actually guards whether the export +// exists, not this type. +type UnknownFunction = (...args: any[]) => any; + +/** + * Looks up an export that only exists on newer graphql-js versions than the + * range this package supports (e.g. `coerceInputLiteral`/`validateInputValue`, + * both introduced in graphql-js@17), returning `undefined` on older versions + * where the export doesn't exist yet. The type is read directly off + * graphql-js's own declarations for whichever version is currently installed, + * instead of a hand-written signature that could drift out of sync. + */ +export function getOptionalGraphQLJSExport( + name: Name, +): (Name extends keyof GraphQLJSModule ? GraphQLJSModule[Name] : UnknownFunction) | undefined { + return (GraphQLJS as Record)[name] as any; +} + +const isGraphQLJS17OrAbove = versionInfo.major >= 17; + +// Converts an arbitrary runtime value to a GraphQL AST literal, used only as +// `anyValueType`'s `valueToLiteral` below. graphql-js@17's own generic fallback +// (`defaultScalarValueToLiteral`, not part of its public API so it can't be +// reused directly) only serializes an object's own enumerable properties, +// which silently drops data for values like `Date` (whose contents live in +// methods, not own properties) instead of erroring — so this mirrors it but +// special-cases `.toJSON()` first, the same convention `JSON.stringify` uses, +// so such values round-trip instead of flattening to `{}`. +function valueToASTLiteral(value: unknown): any { + if (value == null) { + return { kind: Kind.NULL }; + } + if (typeof value === 'boolean') { + return { kind: Kind.BOOLEAN, value }; + } + if (typeof value === 'string') { + return { kind: Kind.STRING, value, block: false }; + } + if (typeof value === 'bigint') { + return { kind: Kind.INT, value: value.toString() }; + } + if (typeof value === 'number') { + if (!Number.isFinite(value)) { + return { kind: Kind.NULL }; + } + return Number.isInteger(value) + ? { kind: Kind.INT, value: String(value) } + : { kind: Kind.FLOAT, value: String(value) }; + } + if (typeof value === 'object') { + if (typeof (value as { toJSON?: unknown }).toJSON === 'function') { + return valueToASTLiteral((value as { toJSON(): unknown }).toJSON()); + } + if (Symbol.iterator in (value as object)) { + return { + kind: Kind.LIST, + values: Array.from(value as Iterable, valueToASTLiteral), + }; + } + const fields: Array> = []; + for (const [fieldName, fieldValue] of Object.entries(value)) { + if (fieldValue !== undefined) { + fields.push({ + kind: Kind.OBJECT_FIELD, + name: { kind: Kind.NAME, value: fieldName }, + value: valueToASTLiteral(fieldValue), + }); + } + } + return { kind: Kind.OBJECT, fields }; + } + // Functions, symbols, etc. have no literal representation. + return { kind: Kind.NULL }; +} + +// A throwaway scalar type used only as `sources[varName].signature.type` below. +// graphql-js@17's `valueToLiteral` (invoked internally to resolve a variable +// nested inside an object/list literal argument, e.g. when a custom scalar +// implements its own `coerceInputLiteral`) special-cases NonNull/List/InputObject +// types but otherwise defers entirely to the leaf type's own `valueToLiteral`. +// This package only has each variable's already-coerced runtime value at this +// point, not its declared `GraphQLInputType` (that would require threading the +// operation's variable definitions through every call site), so this bare +// scalar supplies a type-agnostic `valueToLiteral` that works for any runtime +// value regardless of the variable's real declared type. +const anyValueType = new GraphQLScalarType({ + name: '_GraphQLToolsAnyValue', + valueToLiteral: valueToASTLiteral, +} as any); + +function buildVariableSources(variableValues: Record): Record { + const sources: Record = Object.create(null); + for (const varName of Object.keys(variableValues)) { + sources[varName] = { signature: { type: anyValueType }, value: variableValues[varName] }; + } + return sources; +} + +// `variableValues` is the same object reference for the lifetime of a single +// execution (or, in `getArgumentValues.ts`'s case, a single call), so memoize +// the wrapper by reference instead of reallocating `{ coerced, sources }` on +// every call site that needs it (once per AST node during selection-set +// collection, once per resolved field during execution). +const wrapVariableValues = memoize1((variableValues: Record) => ({ + coerced: variableValues, + sources: buildVariableSources(variableValues), +})); + +/** + * graphql-js@17's built-in `getDirectiveValues`/`getArgumentValues` expect + * `variableValues` as the structured `{ coerced, sources }` shape rather than + * a flat map of variable name to value. This package deals in flat maps + * everywhere else, so wrap them right before handing them to graphql-js's own + * (unforked) directive-argument coercion, only for graphql-js >= 17. + */ +export function toGraphQLJSVariableValues(variableValues: any): any { + if (variableValues == null || !isGraphQLJS17OrAbove) { + return variableValues; + } + return wrapVariableValues(variableValues); +} diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index ee5b6831896..ec53696d102 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -1,3 +1,4 @@ +export * from './graphqlJSCompat.js'; export * from './loaders.js'; export * from './helpers.js'; export * from './get-directives.js'; diff --git a/packages/utils/tests/getArgumentValues.spec.ts b/packages/utils/tests/getArgumentValues.spec.ts new file mode 100644 index 00000000000..1f72ac68442 --- /dev/null +++ b/packages/utils/tests/getArgumentValues.spec.ts @@ -0,0 +1,62 @@ +import { + FieldNode, + GraphQLField, + GraphQLScalarType, + OperationDefinitionNode, + parse, + valueFromASTUntyped, + versionInfo, +} from 'graphql'; +import { getArgumentValues } from '../src/getArgumentValues.js'; + +// These tests exercise graphql-js@17's `coerceInputLiteral` mechanism +// specifically (a custom scalar implementing it, with a variable nested +// inside an object literal argument) — on older versions, argument coercion +// takes an entirely different (legacy `valueFromAST`) code path that isn't +// what's under test here, so skip rather than assert on that unrelated path. +(versionInfo.major >= 17 ? describe : describe.skip)('getArgumentValues', () => { + it('resolves a variable nested inside an object literal argument for a custom scalar with coerceInputLiteral', () => { + const JSONScalar = new GraphQLScalarType({ + name: 'JSON', + coerceInputValue: (v: any) => v, + // A real `coerceInputLiteral` parses the AST node itself, same as the + // legacy `parseLiteral` it supersedes. + coerceInputLiteral: (node: any) => valueFromASTUntyped(node), + } as any); + + const field = { + name: 'foo', + args: [{ name: 'data', type: JSONScalar }], + } as unknown as GraphQLField; + + const doc = parse('{ foo(data: { key: $v }) }'); + const op = doc.definitions[0] as OperationDefinitionNode; + const fieldNode = op.selectionSet.selections[0] as FieldNode; + + const result = getArgumentValues(field, fieldNode, { v: 'hello' }); + + expect(result).toEqual({ data: { key: 'hello' } }); + }); + + it('preserves a Date-valued variable nested inside an object literal argument', () => { + const JSONScalar = new GraphQLScalarType({ + name: 'JSON', + coerceInputValue: (v: any) => v, + coerceInputLiteral: (node: any) => valueFromASTUntyped(node), + } as any); + + const field = { + name: 'foo', + args: [{ name: 'data', type: JSONScalar }], + } as unknown as GraphQLField; + + const doc = parse('{ foo(data: { occurredAt: $when }) }'); + const op = doc.definitions[0] as OperationDefinitionNode; + const fieldNode = op.selectionSet.selections[0] as FieldNode; + + const when = new Date('2024-01-01T00:00:00.000Z'); + const result = getArgumentValues(field, fieldNode, { when }); + + expect(result).toEqual({ data: { occurredAt: when.toJSON() } }); + }); +}); diff --git a/packages/utils/tests/mapSchema.test.ts b/packages/utils/tests/mapSchema.test.ts index d93245f98bd..dbccfc216db 100644 --- a/packages/utils/tests/mapSchema.test.ts +++ b/packages/utils/tests/mapSchema.test.ts @@ -809,6 +809,7 @@ describe('mapSchema', () => { type: GraphQLID, description: 'Unique ID', args: {}, + extensions: {}, resolve(object: any) { const hash = createHash('sha1'); hash.update(type.name); diff --git a/patches/@types+relay-compiler+8.0.4.patch b/patches/@types+relay-compiler+8.0.4.patch new file mode 100644 index 00000000000..b078876b600 --- /dev/null +++ b/patches/@types+relay-compiler+8.0.4.patch @@ -0,0 +1,23 @@ +diff --git a/node_modules/@types/relay-compiler/lib/core/Schema.d.ts b/node_modules/@types/relay-compiler/lib/core/Schema.d.ts +index c79aea0..804e180 100755 +--- a/node_modules/@types/relay-compiler/lib/core/Schema.d.ts ++++ b/node_modules/@types/relay-compiler/lib/core/Schema.d.ts +@@ -1,11 +1,17 @@ + import { + TypeNode, + DocumentNode, +- DirectiveLocationEnum, ++ DirectiveLocation, + ValueNode, + } from 'graphql'; + import { Field as IRField } from './IR'; + ++// `DirectiveLocationEnum` was removed in graphql-js@17 in favor of a dual value/type ++// export named `DirectiveLocation`, which doesn't work as a bare type reference on ++// older graphql-js versions (there, `DirectiveLocation` is only a value). This ++// derives the member-value union directly so it resolves correctly either way. ++type DirectiveLocationEnum = (typeof DirectiveLocation)[keyof typeof DirectiveLocation]; ++ + export type AbstractTypeID = any; + export type CompositeTypeID = any; + export type EnumTypeID = any; diff --git a/patches/subscriptions-transport-ws+0.11.0.patch b/patches/subscriptions-transport-ws+0.11.0.patch new file mode 100644 index 00000000000..773711a4314 --- /dev/null +++ b/patches/subscriptions-transport-ws+0.11.0.patch @@ -0,0 +1,32 @@ +diff --git a/node_modules/subscriptions-transport-ws/dist/client.d.ts b/node_modules/subscriptions-transport-ws/dist/client.d.ts +index c50cb80..ff43008 100644 +--- a/node_modules/subscriptions-transport-ws/dist/client.d.ts ++++ b/node_modules/subscriptions-transport-ws/dist/client.d.ts +@@ -1,5 +1,5 @@ + import { ListenerFn } from 'eventemitter3'; +-import { ExecutionResult } from 'graphql/execution/execute'; ++import { ExecutionResult } from 'graphql'; + import { DocumentNode } from 'graphql/language/ast'; + export interface Observer { + next?: (value: T) => void; +diff --git a/node_modules/subscriptions-transport-ws/dist/server.d.ts b/node_modules/subscriptions-transport-ws/dist/server.d.ts +index d46ca46..2a8ce0d 100644 +--- a/node_modules/subscriptions-transport-ws/dist/server.d.ts ++++ b/node_modules/subscriptions-transport-ws/dist/server.d.ts +@@ -1,6 +1,6 @@ + /// + import * as WebSocket from 'ws'; +-import { ExecutionResult, GraphQLSchema, DocumentNode, ValidationContext, ExecutionArgs, SubscriptionArgs } from 'graphql'; ++import { ExecutionResult, GraphQLSchema, DocumentNode, ValidationContext, ExecutionArgs } from 'graphql'; + import { IncomingMessage } from 'http'; + export declare type ExecutionIterator = AsyncIterator; + export interface ExecutionParams { +@@ -38,7 +38,7 @@ export interface OperationMessage { + type: string; + } + export declare type ExecuteFunction = (args: ExecutionArgs) => ExecutionResult | Promise | AsyncIterator; +-export declare type SubscribeFunction = (args: SubscriptionArgs) => AsyncIterator | Promise | ExecutionResult>; ++export declare type SubscribeFunction = (args: ExecutionArgs) => AsyncIterator | Promise | ExecutionResult>; + export interface ServerOptions { + rootValue?: any; + schema?: GraphQLSchema;