diff --git a/graphql_test.go b/graphql_test.go index 5be998193..d4f5bb53b 100644 --- a/graphql_test.go +++ b/graphql_test.go @@ -5211,8 +5211,8 @@ func TestCircularFragmentMaxDepth(t *testing.T) { } `, ExpectedErrors: []*gqlerrors.QueryError{{ - Message: `Cannot spread fragment "X" within itself via Y.`, - Rule: "NoFragmentCycles", + Message: `Cannot spread fragment "X" within itself via "Y".`, + Rule: "NoFragmentCyclesRule", Locations: []gqlerrors.Location{ {Line: 7, Column: 20}, {Line: 10, Column: 20}, diff --git a/internal/common/types.go b/internal/common/types.go index a9ff452f5..4bc7abf8a 100644 --- a/internal/common/types.go +++ b/internal/common/types.go @@ -56,7 +56,7 @@ func ResolveType(t ast.Type, resolver Resolver) (ast.Type, *errors.QueryError) { refT := resolver(t.Name) if refT == nil { err := errors.Errorf("Unknown type %q.", t.Name) - err.Rule = "KnownTypeNames" + err.Rule = "KnownTypeNamesRule" err.Locations = []errors.Location{t.Loc} return nil, err } diff --git a/internal/validation/testdata/README.md b/internal/validation/testdata/README.md new file mode 100644 index 000000000..7d681c5f4 --- /dev/null +++ b/internal/validation/testdata/README.md @@ -0,0 +1,29 @@ +# graphql-js testdata + +Test cases are generated here by extracting them from [graphql-js] into JSON that we can use to drive Go tests. + +## Usage + +To update the testdata, run the following command within the `testdata` directory: + +```sh +go generate . +``` + +## How it works + +A Node.js project is used to pull in graphql-js as a dependency, and automatically patch that via `patch-package`. These +patches replace the `mocha` test functions `describe`, `it`, assertions and the test `harness`. This allows the +expectations to be captured, and written to a JSON file. These test cases in the JSON file are then used to drive the Go +tests. + +## Updating patches + +With changes to [graphql-js], the patches may need to be updated. To do this, update the `graphql` dependency under +`node_modules`, and sync the patches with the following command: + +```sh +npm run create-patches +``` + +[graphql-js]: https://github.com/graphql/graphql-js diff --git a/internal/validation/testdata/export.js b/internal/validation/testdata/export.js deleted file mode 100644 index a7bda4707..000000000 --- a/internal/validation/testdata/export.js +++ /dev/null @@ -1,118 +0,0 @@ -import fs from 'fs'; -import Module from 'module'; -import { testSchema } from './src/validation/__tests__/harness'; -import { printSchema } from './src/utilities'; - -let schemas = []; -function registerSchema(schema) { - for (let i = 0; i < schemas.length; i++) { - if (schemas[i] == schema) { - return i; - } - } - schemas.push(schema); - return schemas.length - 1; -} - -const harness = { - expectPassesRule(rule, queryString) { - harness.expectPassesRuleWithSchema(testSchema, rule, queryString); - }, - expectPassesRuleWithSchema(schema, rule, queryString, errors) { - tests.push({ - name: names.join('/'), - rule: rule.name, - schema: registerSchema(schema), - query: queryString, - errors: [], - }); - }, - expectFailsRule(rule, queryString, errors) { - harness.expectFailsRuleWithSchema(testSchema, rule, queryString, errors); - }, - expectFailsRuleWithSchema(schema, rule, queryString, errors) { - tests.push({ - name: names.join('/'), - rule: rule.name, - schema: registerSchema(schema), - query: queryString, - errors: errors, - }); - } -}; - -let tests = []; -let names = []; -const fakeModules = { - 'mocha': { - describe(name, f) { - switch (name) { - case 'within schema language': - return; - } - names.push(name); - f(); - names.pop(); - }, - it(name, f) { - switch (name) { - case 'ignores type definitions': - case 'reports correctly when a non-exclusive follows an exclusive': - case 'disallows differing subfields': - return; - } - names.push(name); - f(); - names.pop(); - }, - }, - './harness': harness, -}; - -const originalLoader = Module._load; -Module._load = function(request, parent, isMain) { - return fakeModules[request] || originalLoader(request, parent, isMain); -}; - -// TODO: Fix test failures. -// require('./src/validation/__tests__/ExecutableDefinitions-test'); -require('./src/validation/__tests__/FieldsOnCorrectType-test'); -require('./src/validation/__tests__/FragmentsOnCompositeTypes-test'); -// TODO: Fix test failures. -// require('./src/validation/__tests__/KnownArgumentNames-test'); -require('./src/validation/__tests__/KnownDirectives-test'); -require('./src/validation/__tests__/KnownFragmentNames-test'); -require('./src/validation/__tests__/KnownTypeNames-test'); -require('./src/validation/__tests__/LoneAnonymousOperation-test'); -require('./src/validation/__tests__/NoFragmentCycles-test'); -require('./src/validation/__tests__/NoUndefinedVariables-test'); -require('./src/validation/__tests__/NoUnusedFragments-test'); -require('./src/validation/__tests__/NoUnusedVariables-test'); -require('./src/validation/__tests__/OverlappingFieldsCanBeMerged-test'); -// TODO: Fix test failures. -// require('./src/validation/__tests__/PossibleFragmentSpreads-test'); -require('./src/validation/__tests__/ProvidedNonNullArguments-test'); -require('./src/validation/__tests__/ScalarLeafs-test'); -// TODO: Add support for subscriptions. -// require('./src/validation/__tests__/SingleFieldSubscriptions-test.js'); -require('./src/validation/__tests__/UniqueArgumentNames-test'); -require('./src/validation/__tests__/UniqueDirectivesPerLocation-test'); -require('./src/validation/__tests__/UniqueFragmentNames-test'); -require('./src/validation/__tests__/UniqueInputFieldNames-test'); -require('./src/validation/__tests__/UniqueOperationNames-test'); -require('./src/validation/__tests__/UniqueVariableNames-test'); -// TODO: Fix test failures. -// require('./src/validation/__tests__/ValuesofCorrectType-test'); -require('./src/validation/__tests__/VariablesAreInputTypes-test'); -// TODO: Fix test failures. -// require('./src/validation/__tests__/VariablesDefaultValueAllowed-test'); -require('./src/validation/__tests__/VariablesInAllowedPosition-test'); - -let output = JSON.stringify({ - schemas: schemas.map(s => printSchema(s)), - tests: tests, -}, null, 2) -output = output.replace(' Did you mean to use an inline fragment on \\"Dog\\" or \\"Cat\\"?', ''); -output = output.replace(' Did you mean to use an inline fragment on \\"Being\\", \\"Pet\\", \\"Canine\\", \\"Dog\\", or \\"Cat\\"?', ''); -output = output.replace(' Did you mean \\"Pet\\"?', ''); -fs.writeFileSync("tests.json", output); diff --git a/internal/validation/testdata/export.ts b/internal/validation/testdata/export.ts new file mode 100644 index 000000000..820aac6aa --- /dev/null +++ b/internal/validation/testdata/export.ts @@ -0,0 +1,46 @@ +import * as fs from 'node:fs'; +import { printSchema } from 'graphql/src/utilities/printSchema.js'; +import { schemas, testCases } from 'graphql/src/validation/__tests__/harness.js'; + +// TODO: Fix test failures. +// require('graphql/src/validation/__tests__/ExecutableDefinitions-test'); +import 'graphql/src/validation/__tests__/FieldsOnCorrectTypeRule-test.js'; +import 'graphql/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.js'; +// TODO: Fix test failures. +// require('graphql/src/validation/__tests__/KnownArgumentNames-test'); +import 'graphql/src/validation/__tests__/KnownDirectivesRule-test.js'; +import 'graphql/src/validation/__tests__/KnownFragmentNamesRule-test.js'; +import 'graphql/src/validation/__tests__/KnownTypeNamesRule-test.js'; +import 'graphql/src/validation/__tests__/LoneAnonymousOperationRule-test.js'; +import 'graphql/src/validation/__tests__/NoFragmentCyclesRule-test.js'; +import 'graphql/src/validation/__tests__/NoUndefinedVariablesRule-test.js'; +import 'graphql/src/validation/__tests__/NoUnusedFragmentsRule-test.js'; +import 'graphql/src/validation/__tests__/NoUnusedVariablesRule-test.js'; +import 'graphql/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.js'; +// TODO: Fix test failures. +// require('graphql/src/validation/__tests__/PossibleFragmentSpreads-test'); +import 'graphql/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.js'; +import 'graphql/src/validation/__tests__/ScalarLeafsRule-test.js'; +// TODO: Add support for subscriptions. +// require('graphql/src/validation/__tests__/SingleFieldSubscriptions-test.js'); +import 'graphql/src/validation/__tests__/UniqueArgumentNamesRule-test.js'; +import 'graphql/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.js'; +import 'graphql/src/validation/__tests__/UniqueFragmentNamesRule-test.js'; +import 'graphql/src/validation/__tests__/UniqueInputFieldNamesRule-test.js'; +import 'graphql/src/validation/__tests__/UniqueOperationNamesRule-test.js'; +import 'graphql/src/validation/__tests__/UniqueVariableNamesRule-test.js'; +// TODO: Fix test failures. +// require('graphql/src/validation/__tests__/ValuesofCorrectType-test'); +import 'graphql/src/validation/__tests__/VariablesAreInputTypesRule-test.js'; +// TODO: Fix test failures. +// require('graphql/src/validation/__tests__/VariablesDefaultValueAllowed-test'); +import 'graphql/src/validation/__tests__/VariablesInAllowedPositionRule-test.js'; + +let output = JSON.stringify({ + schemas: schemas().map(s => printSchema(s)), + tests: testCases(), +}, null, 2) +output = output.replace(/ Did you mean to use an inline fragment on [^?]*\?/g, ''); +// Ignore suggested types in errors, which graphql-go does not currently produce. +output = output.replace(/ Did you mean \\"[A-Z].*\"\?/g, ''); +fs.writeFileSync("tests.json", output); diff --git a/internal/validation/testdata/gen.go b/internal/validation/testdata/gen.go index 8632bab11..23f413b07 100644 --- a/internal/validation/testdata/gen.go +++ b/internal/validation/testdata/gen.go @@ -6,10 +6,8 @@ // - npm >= 5.2.0 (for use of npx) // // Usage: -// $ git clone https://github.com/graphql/graphql-js // $ go generate . package testdata //go:generate npm install -//go:generate cp export.js graphql-js/export.js -//go:generate npx babel-node graphql-js/export.js +//go:generate npm run export diff --git a/internal/validation/testdata/package-lock.json b/internal/validation/testdata/package-lock.json index a1917ae14..06c58e469 100644 --- a/internal/validation/testdata/package-lock.json +++ b/internal/validation/testdata/package-lock.json @@ -1,2637 +1,1097 @@ { "name": "testdata", "version": "0.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "packages": { + "": { + "name": "testdata", + "version": "0.0.0", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "devDependencies": { + "@types/chai": "4.3.4", + "chai": "^4.3.7", + "graphql": "github:graphql/graphql-js", + "patch-package": "^8.0.0", + "postinstall-postinstall": "^2.1.0", + "ts-node": "10.9.1", + "typescript": "5.0.4" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, - "optional": true, - "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "node_modules/@tsconfig/node10": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.10.tgz", + "integrity": "sha512-PiaIWIoPvO6qm6t114ropMCagj6YAF24j9OkCA2mJDXFnlionEwhsBCJ8yek4aib575BI3OkART/90WsgHgLWw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@types/chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", "dev": true, - "optional": true, - "requires": { - "arr-flatten": "1.1.0" + "peer": true, + "dependencies": { + "undici-types": "~5.26.4" } }, - "arr-flatten": { + "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, - "optional": true + "engines": { + "node": ">=0.4.0" + } }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "optional": true + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, - "assertion-error": { + "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true, - "optional": true - }, - "babel-cli": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", - "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", - "dev": true, - "requires": { - "babel-core": "6.26.0", - "babel-polyfill": "6.26.0", - "babel-register": "6.26.0", - "babel-runtime": "6.26.0", - "chokidar": "1.7.0", - "commander": "2.15.0", - "convert-source-map": "1.5.1", - "fs-readdir-recursive": "1.1.0", - "glob": "7.1.2", - "lodash": "4.17.5", - "output-file-sync": "1.1.2", - "path-is-absolute": "1.0.1", - "slash": "1.0.0", - "source-map": "0.5.7", - "v8flags": "2.1.1" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-core": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", - "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "babel-generator": "6.26.1", - "babel-helpers": "6.24.1", - "babel-messages": "6.23.0", - "babel-register": "6.26.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "convert-source-map": "1.5.1", - "debug": "2.6.9", - "json5": "0.5.1", - "lodash": "4.17.5", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.8", - "slash": "1.0.0", - "source-map": "0.5.7" - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.5", - "source-map": "0.5.7", - "trim-right": "1.0.1" - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, - "requires": { - "babel-helper-explode-assignable-expression": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" - } - }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", - "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "lodash": "4.17.5" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "engines": { + "node": "*" } }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "engines": { + "node": ">= 4.0.0" } }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "lodash": "4.17.5" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" } }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, - "requires": { - "babel-helper-optimise-call-expression": "6.24.1", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "node_modules/chai": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" } }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-async-generators": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", - "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", - "dev": true - }, - "babel-plugin-syntax-class-properties": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", - "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", - "dev": true + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } }, - "babel-plugin-syntax-flow": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", - "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "6.24.1", - "babel-plugin-syntax-async-functions": "6.13.0", - "babel-runtime": "6.26.0" + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" } }, - "babel-plugin-transform-class-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", - "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-plugin-syntax-class-properties": "6.13.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" } }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "engines": { + "node": ">=0.3.1" } }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "lodash": "4.17.5" + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" } }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, - "requires": { - "babel-helper-define-map": "6.26.0", - "babel-helper-function-name": "6.24.1", - "babel-helper-optimise-call-expression": "6.24.1", - "babel-helper-replace-supers": "6.24.1", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "engines": { + "node": ">= 0.4" } }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "dependencies": { + "micromatch": "^4.0.2" } }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" } }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, - "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "engines": { + "node": "*" } }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", - "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "requires": { - "babel-plugin-transform-strict-mode": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-types": "6.26.0" + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphql": { + "version": "17.0.0-alpha.3", + "resolved": "git+ssh://git@github.com/graphql/graphql-js.git#a81e6238fa3f3dd317cb33572dcc97020376c329", "dev": true, - "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "license": "MIT", + "engines": { + "node": "^16.19.0 || ^18.14.0 || >=19.7.0" } }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-amd": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "engines": { + "node": ">=8" } }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, - "requires": { - "babel-helper-replace-supers": "6.24.1", - "babel-runtime": "6.26.0" + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, - "requires": { - "babel-helper-call-delegate": "6.24.1", - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" } }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, - "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" } }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "requires": { - "babel-runtime": "6.26.0" + "engines": { + "node": ">=0.12.0" } }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, - "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "regexpu-core": "2.0.0" + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/json-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz", + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", "dev": true, - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", - "babel-plugin-syntax-exponentiation-operator": "6.13.0", - "babel-runtime": "6.26.0" + "dependencies": { + "call-bind": "^1.0.5", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-flow-strip-types": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, - "requires": { - "babel-plugin-syntax-flow": "6.18.0", - "babel-runtime": "6.26.0" + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", - "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", "dev": true, - "requires": { - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "babel-runtime": "6.26.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", "dev": true, - "requires": { - "regenerator-transform": "0.10.1" + "dependencies": { + "graceful-fs": "^4.1.11" } }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "dependencies": { + "get-func-name": "^2.0.1" } }, - "babel-polyfill": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", - "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "core-js": "2.5.3", - "regenerator-runtime": "0.10.5" - }, "dependencies": { - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", - "dev": true - } + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "babel-preset-env": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", - "integrity": "sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA==", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "6.22.0", - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-es2015-arrow-functions": "6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", - "babel-plugin-transform-es2015-block-scoping": "6.26.0", - "babel-plugin-transform-es2015-classes": "6.24.1", - "babel-plugin-transform-es2015-computed-properties": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", - "babel-plugin-transform-es2015-for-of": "6.23.0", - "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-literals": "6.22.0", - "babel-plugin-transform-es2015-modules-amd": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", - "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", - "babel-plugin-transform-es2015-modules-umd": "6.24.1", - "babel-plugin-transform-es2015-object-super": "6.24.1", - "babel-plugin-transform-es2015-parameters": "6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", - "babel-plugin-transform-es2015-spread": "6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "6.24.1", - "babel-plugin-transform-es2015-template-literals": "6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "babel-plugin-transform-regenerator": "6.26.0", - "browserslist": "2.11.3", - "invariant": "2.2.3", - "semver": "5.5.0" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "6.26.0", - "babel-runtime": "6.26.0", - "core-js": "2.5.3", - "home-or-tmp": "2.0.0", - "lodash": "4.17.5", - "mkdirp": "0.5.1", - "source-map-support": "0.4.18" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.5" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.3", - "lodash": "4.17.5" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.5", - "to-fast-properties": "1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "optional": true + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, - "optional": true, - "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "engines": { + "node": ">= 0.4" } }, - "browserslist": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "requires": { - "caniuse-lite": "1.0.30000813", - "electron-to-chromium": "1.3.37" + "dependencies": { + "wrappy": "1" } }, - "caniuse-lite": { - "version": "1.0.30000813", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000813.tgz", - "integrity": "sha512-A8ITSmH5SFdMFdC704ggjg+x2z5PzQmVlG8tavwnfvbC33Q1UYrj0+G+Xm0SNAnd4He36fwUE/KEWytOEchw+A==", - "dev": true + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, - "requires": { - "assertion-error": "1.1.0", - "check-error": "1.0.2", - "deep-eql": "3.0.1", - "get-func-name": "2.0.0", - "pathval": "1.1.0", - "type-detect": "4.0.8" + "engines": { + "node": ">=0.10.0" } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "node_modules/patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" } }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "optional": true, - "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.1.3", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" - } - }, - "commander": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.0.tgz", - "integrity": "sha512-7B1ilBwtYSbetCgTY1NJFg+gVpestg0fdA1MhC1Vs4ssyfSXnCAjFr+QcQM9/RedXC0EaUx1sG8Smgw2VfgKEg==", - "dev": true + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", - "dev": true + "node_modules/postinstall-postinstall": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz", + "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==", + "dev": true, + "hasInstallScript": true }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, - "optional": true + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, - "requires": { - "ms": "2.0.0" + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, - "requires": { - "type-detect": "4.0.8" + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { - "repeating": "2.0.1" + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "electron-to-chromium": { - "version": "1.3.37", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.37.tgz", - "integrity": "sha1-SpJzTgBEyM8LFVO+V+riGkxuX6s=", - "dev": true + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, - "optional": true, - "requires": { - "is-posix-bracket": "0.1.1" + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" } }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "optional": true, - "requires": { - "fill-range": "2.2.3" + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, - "optional": true, - "requires": { - "is-extglob": "1.0.0" + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "optional": true + "engines": { + "node": ">=4" + } }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "node_modules/typescript": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true, - "optional": true, - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=12.20" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true, - "optional": true + "peer": true }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, - "optional": true, - "requires": { - "for-in": "1.0.2" + "engines": { + "node": ">= 10.0.0" } }, - "fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "optional": true, - "requires": { - "nan": "2.9.2", - "node-pre-gyp": "0.6.39" - }, "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "1.0.2", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "dev": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - } - } - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "optional": true, - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "2.0.1" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "invariant": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz", - "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==", - "dev": true, - "requires": { - "loose-envify": "1.3.1" - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "1.11.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true, - "optional": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "optional": true, - "requires": { - "is-primitive": "2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "optional": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "3.2.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true, - "optional": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "optional": true, - "requires": { - "isarray": "1.0.0" - } - }, - "iterall": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", - "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "dev": true, - "requires": { - "js-tokens": "3.0.2" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "1.1.11" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "nan": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz", - "integrity": "sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw==", - "dev": true, - "optional": true - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "optional": true, - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "output-file-sync": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", - "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "mkdirp": "0.5.1", - "object-assign": "4.1.1" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "optional": true, - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true, - "optional": true - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true, - "optional": true - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "dev": true, - "optional": true, - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "isexe": "^2.0.0" }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.5", - "set-immediate-shim": "1.0.1" - } - }, - "regenerate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", - "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regenerator-transform": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "private": "0.1.8" - } - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "optional": true, - "requires": { - "is-equal-shallow": "0.1.3" - } - }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "dev": true, - "requires": { - "regenerate": "1.3.3", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "0.5.0" + "bin": { + "node-which": "bin/node-which" }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } + "engines": { + "node": ">= 8" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "optional": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true, - "optional": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "0.5.7" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "node_modules/yaml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", "dev": true, - "requires": { - "ansi-regex": "2.1.1" + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "optional": true - }, - "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", - "dev": true, - "requires": { - "user-home": "1.1.1" + "engines": { + "node": ">=6" } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true } } } diff --git a/internal/validation/testdata/package.json b/internal/validation/testdata/package.json index 6548c3d6f..bd52e4536 100644 --- a/internal/validation/testdata/package.json +++ b/internal/validation/testdata/package.json @@ -1,23 +1,22 @@ { "name": "testdata", + "type": "module", "version": "0.0.0", "description": "Extracts test data from github.com/graphql/graphql-js", "main": "", "devDependencies": { - "babel-cli": "^6.26.0", - "babel-plugin-syntax-async-functions": "^6.13.0", - "babel-plugin-syntax-async-generators": "^6.13.0", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-es2015-classes": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-flow-strip-types": "^6.22.0", - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-preset-env": "^1.6.1", - "chai": "^4.1.2", - "iterall": "^1.2.2" + "@types/chai": "4.3.4", + "chai": "^4.3.7", + "graphql": "github:graphql/graphql-js", + "patch-package": "^8.0.0", + "postinstall-postinstall": "^2.1.0", + "ts-node": "10.9.1", + "typescript": "5.0.4" }, "scripts": { + "create-patches": "npx patch-package graphql", + "export": "node --loader ts-node/esm export.ts", + "postinstall": "patch-package", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/internal/validation/testdata/patches/graphql+17.0.0-alpha.3.patch b/internal/validation/testdata/patches/graphql+17.0.0-alpha.3.patch new file mode 100644 index 000000000..86f4a5a34 --- /dev/null +++ b/internal/validation/testdata/patches/graphql+17.0.0-alpha.3.patch @@ -0,0 +1,438 @@ +diff --git a/node_modules/graphql/src/validation/__tests__/FieldsOnCorrectTypeRule-test.ts b/node_modules/graphql/src/validation/__tests__/FieldsOnCorrectTypeRule-test.ts +index 1c7fbc0..1771fff 100644 +--- a/node_modules/graphql/src/validation/__tests__/FieldsOnCorrectTypeRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/FieldsOnCorrectTypeRule-test.ts +@@ -1,5 +1,4 @@ + import { expect } from 'chai'; +-import { describe, it } from 'mocha'; + + import { parse } from '../../language/parser.js'; + +@@ -10,7 +9,7 @@ import { buildSchema } from '../../utilities/buildASTSchema.js'; + import { FieldsOnCorrectTypeRule } from '../rules/FieldsOnCorrectTypeRule.js'; + import { validate } from '../validate.js'; + +-import { expectValidationErrorsWithSchema } from './harness.js'; ++import { describe, it, expectValidationErrorsWithSchema } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrorsWithSchema( +diff --git a/node_modules/graphql/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.ts b/node_modules/graphql/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.ts +index 849b662..1e37004 100644 +--- a/node_modules/graphql/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { FragmentsOnCompositeTypesRule } from '../rules/FragmentsOnCompositeTypesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(FragmentsOnCompositeTypesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/KnownDirectivesRule-test.ts b/node_modules/graphql/src/validation/__tests__/KnownDirectivesRule-test.ts +index a3bbc19..7b04bba 100644 +--- a/node_modules/graphql/src/validation/__tests__/KnownDirectivesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/KnownDirectivesRule-test.ts +@@ -1,5 +1,3 @@ +-import { describe, it } from 'mocha'; +- + import type { GraphQLSchema } from '../../type/schema.js'; + + import { buildSchema } from '../../utilities/buildASTSchema.js'; +@@ -7,6 +5,8 @@ import { buildSchema } from '../../utilities/buildASTSchema.js'; + import { KnownDirectivesRule } from '../rules/KnownDirectivesRule.js'; + + import { ++ describe, ++ it, + expectSDLValidationErrors, + expectValidationErrorsWithSchema, + } from './harness.js'; +diff --git a/node_modules/graphql/src/validation/__tests__/KnownFragmentNamesRule-test.ts b/node_modules/graphql/src/validation/__tests__/KnownFragmentNamesRule-test.ts +index ad0158b..bc5a356 100644 +--- a/node_modules/graphql/src/validation/__tests__/KnownFragmentNamesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/KnownFragmentNamesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { KnownFragmentNamesRule } from '../rules/KnownFragmentNamesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(KnownFragmentNamesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/KnownTypeNamesRule-test.ts b/node_modules/graphql/src/validation/__tests__/KnownTypeNamesRule-test.ts +index 0440c09..69d950a 100644 +--- a/node_modules/graphql/src/validation/__tests__/KnownTypeNamesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/KnownTypeNamesRule-test.ts +@@ -1,5 +1,3 @@ +-import { describe, it } from 'mocha'; +- + import type { GraphQLSchema } from '../../type/schema.js'; + + import { buildSchema } from '../../utilities/buildASTSchema.js'; +@@ -7,6 +5,8 @@ import { buildSchema } from '../../utilities/buildASTSchema.js'; + import { KnownTypeNamesRule } from '../rules/KnownTypeNamesRule.js'; + + import { ++ describe, ++ it, + expectSDLValidationErrors, + expectValidationErrors, + expectValidationErrorsWithSchema, +diff --git a/node_modules/graphql/src/validation/__tests__/LoneAnonymousOperationRule-test.ts b/node_modules/graphql/src/validation/__tests__/LoneAnonymousOperationRule-test.ts +index f60750b..df1d288 100644 +--- a/node_modules/graphql/src/validation/__tests__/LoneAnonymousOperationRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/LoneAnonymousOperationRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { LoneAnonymousOperationRule } from '../rules/LoneAnonymousOperationRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(LoneAnonymousOperationRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/NoFragmentCyclesRule-test.ts b/node_modules/graphql/src/validation/__tests__/NoFragmentCyclesRule-test.ts +index 69f951c..f1da380 100644 +--- a/node_modules/graphql/src/validation/__tests__/NoFragmentCyclesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/NoFragmentCyclesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { NoFragmentCyclesRule } from '../rules/NoFragmentCyclesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(NoFragmentCyclesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/NoUndefinedVariablesRule-test.ts b/node_modules/graphql/src/validation/__tests__/NoUndefinedVariablesRule-test.ts +index c6ed758..920df75 100644 +--- a/node_modules/graphql/src/validation/__tests__/NoUndefinedVariablesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/NoUndefinedVariablesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { NoUndefinedVariablesRule } from '../rules/NoUndefinedVariablesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(NoUndefinedVariablesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/NoUnusedFragmentsRule-test.ts b/node_modules/graphql/src/validation/__tests__/NoUnusedFragmentsRule-test.ts +index d20f99e..75cda8b 100644 +--- a/node_modules/graphql/src/validation/__tests__/NoUnusedFragmentsRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/NoUnusedFragmentsRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { NoUnusedFragmentsRule } from '../rules/NoUnusedFragmentsRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(NoUnusedFragmentsRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/NoUnusedVariablesRule-test.ts b/node_modules/graphql/src/validation/__tests__/NoUnusedVariablesRule-test.ts +index 47dac39..96b0e3e 100644 +--- a/node_modules/graphql/src/validation/__tests__/NoUnusedVariablesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/NoUnusedVariablesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { NoUnusedVariablesRule } from '../rules/NoUnusedVariablesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(NoUnusedVariablesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.ts b/node_modules/graphql/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.ts +index ecb56a1..cde5f38 100644 +--- a/node_modules/graphql/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.ts +@@ -1,5 +1,3 @@ +-import { describe, it } from 'mocha'; +- + import type { GraphQLSchema } from '../../type/schema.js'; + + import { buildSchema } from '../../utilities/buildASTSchema.js'; +@@ -7,6 +5,8 @@ import { buildSchema } from '../../utilities/buildASTSchema.js'; + import { OverlappingFieldsCanBeMergedRule } from '../rules/OverlappingFieldsCanBeMergedRule.js'; + + import { ++ describe, ++ it, + expectValidationErrors, + expectValidationErrorsWithSchema, + } from './harness.js'; +diff --git a/node_modules/graphql/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.ts b/node_modules/graphql/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.ts +index 6f0d223..fb7101e 100644 +--- a/node_modules/graphql/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.ts +@@ -1,5 +1,3 @@ +-import { describe, it } from 'mocha'; +- + import type { GraphQLSchema } from '../../type/schema.js'; + + import { buildSchema } from '../../utilities/buildASTSchema.js'; +@@ -10,6 +8,8 @@ import { + } from '../rules/ProvidedRequiredArgumentsRule.js'; + + import { ++ describe, ++ it, + expectSDLValidationErrors, + expectValidationErrors, + } from './harness.js'; +diff --git a/node_modules/graphql/src/validation/__tests__/ScalarLeafsRule-test.ts b/node_modules/graphql/src/validation/__tests__/ScalarLeafsRule-test.ts +index fd000b9..279bbe5 100644 +--- a/node_modules/graphql/src/validation/__tests__/ScalarLeafsRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/ScalarLeafsRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { ScalarLeafsRule } from '../rules/ScalarLeafsRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(ScalarLeafsRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/UniqueArgumentNamesRule-test.ts b/node_modules/graphql/src/validation/__tests__/UniqueArgumentNamesRule-test.ts +index 8a08f98..bf8c4a7 100644 +--- a/node_modules/graphql/src/validation/__tests__/UniqueArgumentNamesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/UniqueArgumentNamesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { UniqueArgumentNamesRule } from '../rules/UniqueArgumentNamesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(UniqueArgumentNamesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.ts b/node_modules/graphql/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.ts +index fd67ff8..ff54aa3 100644 +--- a/node_modules/graphql/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.ts +@@ -1,5 +1,3 @@ +-import { describe, it } from 'mocha'; +- + import { parse } from '../../language/parser.js'; + + import type { GraphQLSchema } from '../../type/schema.js'; +@@ -9,6 +7,8 @@ import { extendSchema } from '../../utilities/extendSchema.js'; + import { UniqueDirectivesPerLocationRule } from '../rules/UniqueDirectivesPerLocationRule.js'; + + import { ++ describe, ++ it, + expectSDLValidationErrors, + expectValidationErrorsWithSchema, + testSchema, +diff --git a/node_modules/graphql/src/validation/__tests__/UniqueFragmentNamesRule-test.ts b/node_modules/graphql/src/validation/__tests__/UniqueFragmentNamesRule-test.ts +index 30b0f5f..515c220 100644 +--- a/node_modules/graphql/src/validation/__tests__/UniqueFragmentNamesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/UniqueFragmentNamesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { UniqueFragmentNamesRule } from '../rules/UniqueFragmentNamesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(UniqueFragmentNamesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/UniqueInputFieldNamesRule-test.ts b/node_modules/graphql/src/validation/__tests__/UniqueInputFieldNamesRule-test.ts +index 3dc56ff..1e2cc24 100644 +--- a/node_modules/graphql/src/validation/__tests__/UniqueInputFieldNamesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/UniqueInputFieldNamesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { UniqueInputFieldNamesRule } from '../rules/UniqueInputFieldNamesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(UniqueInputFieldNamesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/UniqueOperationNamesRule-test.ts b/node_modules/graphql/src/validation/__tests__/UniqueOperationNamesRule-test.ts +index ef24487..17f8e56 100644 +--- a/node_modules/graphql/src/validation/__tests__/UniqueOperationNamesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/UniqueOperationNamesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { UniqueOperationNamesRule } from '../rules/UniqueOperationNamesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(UniqueOperationNamesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/UniqueVariableNamesRule-test.ts b/node_modules/graphql/src/validation/__tests__/UniqueVariableNamesRule-test.ts +index f23c778..3b74faf 100644 +--- a/node_modules/graphql/src/validation/__tests__/UniqueVariableNamesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/UniqueVariableNamesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { UniqueVariableNamesRule } from '../rules/UniqueVariableNamesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(UniqueVariableNamesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/VariablesAreInputTypesRule-test.ts b/node_modules/graphql/src/validation/__tests__/VariablesAreInputTypesRule-test.ts +index 8027a35..1305c6d 100644 +--- a/node_modules/graphql/src/validation/__tests__/VariablesAreInputTypesRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/VariablesAreInputTypesRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { VariablesAreInputTypesRule } from '../rules/VariablesAreInputTypesRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(VariablesAreInputTypesRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/VariablesInAllowedPositionRule-test.ts b/node_modules/graphql/src/validation/__tests__/VariablesInAllowedPositionRule-test.ts +index 1646774..a4358db 100644 +--- a/node_modules/graphql/src/validation/__tests__/VariablesInAllowedPositionRule-test.ts ++++ b/node_modules/graphql/src/validation/__tests__/VariablesInAllowedPositionRule-test.ts +@@ -1,8 +1,6 @@ +-import { describe, it } from 'mocha'; +- + import { VariablesInAllowedPositionRule } from '../rules/VariablesInAllowedPositionRule.js'; + +-import { expectValidationErrors } from './harness.js'; ++import { describe, it, expectValidationErrors } from './harness.js'; + + function expectErrors(queryStr: string) { + return expectValidationErrors(VariablesInAllowedPositionRule, queryStr); +diff --git a/node_modules/graphql/src/validation/__tests__/harness.ts b/node_modules/graphql/src/validation/__tests__/harness.ts +index b7710ff..8287c61 100644 +--- a/node_modules/graphql/src/validation/__tests__/harness.ts ++++ b/node_modules/graphql/src/validation/__tests__/harness.ts +@@ -8,7 +8,7 @@ import type { GraphQLSchema } from '../../type/schema.js'; + + import { buildSchema } from '../../utilities/buildASTSchema.js'; + +-import { validate, validateSDL } from '../validate.js'; ++import { validateSDL } from '../validate.js'; + import type { + SDLValidationRule, + ValidationRule, +@@ -124,29 +124,89 @@ export const testSchema: GraphQLSchema = buildSchema(` + directive @onField on FIELD + `); + ++let _schemas: GraphQLSchema[] = []; ++function registerSchema(schema: GraphQLSchema) { ++ for (let i = 0; i < _schemas.length; i++) { ++ if (_schemas[i] == schema) { ++ return i; ++ } ++ } ++ _schemas.push(schema); ++ return _schemas.length - 1; ++} ++ ++type Test = { ++ name: string, ++ rule: string, ++ schema: number, ++ query: string, ++ errors: any[], ++}; ++ ++let tests: Test[] = []; ++let names: string[] = []; ++ + export function expectValidationErrorsWithSchema( +- schema: GraphQLSchema, +- rule: ValidationRule, +- queryStr: string, ++ schema: GraphQLSchema, ++ rule: ValidationRule, ++ queryStr: string, + ): any { +- const doc = parse(queryStr); +- const errors = validate(schema, doc, [rule]); +- return expectJSON(errors); ++ return { ++ toDeepEqual: (errors: any[]) => { ++ return tests.push({ ++ name: names.join('/'), ++ rule: rule.name, ++ schema: registerSchema(schema), ++ query: queryStr, ++ errors: errors, ++ }); ++ } ++ } + } + + export function expectValidationErrors( +- rule: ValidationRule, +- queryStr: string, ++ rule: ValidationRule, ++ queryStr: string, + ): any { + return expectValidationErrorsWithSchema(testSchema, rule, queryStr); + } + + export function expectSDLValidationErrors( +- schema: Maybe, +- rule: SDLValidationRule, +- sdlStr: string, ++ schema: Maybe, ++ rule: SDLValidationRule, ++ sdlStr: string, + ): any { + const doc = parse(sdlStr); + const errors = validateSDL(doc, schema, [rule]); + return expectJSON(errors); + } ++ ++export function describe(name: string, f: Function) { ++ switch (name) { ++ case 'within schema language': ++ return; ++ } ++ names.push(name); ++ f(); ++ names.pop(); ++} ++ ++export function it(name: string, f: Function) { ++ switch (name) { ++ case 'ignores type definitions': ++ case 'reports correctly when a non-exclusive follows an exclusive': ++ case 'disallows differing subfields': ++ return; ++ } ++ names.push(name); ++ f(); ++ names.pop(); ++} ++ ++export function schemas(): GraphQLSchema[] { ++ return _schemas; ++} ++ ++export function testCases(): Test[] { ++ return tests; ++} diff --git a/internal/validation/testdata/tests.json b/internal/validation/testdata/tests.json index d9b0710cc..66b1f1db4 100644 --- a/internal/validation/testdata/tests.json +++ b/internal/validation/testdata/tests.json @@ -1,57 +1,63 @@ { "schemas": [ - "schema {\n query: QueryRoot\n}\n\ndirective @onQuery on QUERY\n\ndirective @onMutation on MUTATION\n\ndirective @onSubscription on SUBSCRIPTION\n\ndirective @onField on FIELD\n\ndirective @onFragmentDefinition on FRAGMENT_DEFINITION\n\ndirective @onFragmentSpread on FRAGMENT_SPREAD\n\ndirective @onInlineFragment on INLINE_FRAGMENT\n\ndirective @onSchema on SCHEMA\n\ndirective @onScalar on SCALAR\n\ndirective @onObject on OBJECT\n\ndirective @onFieldDefinition on FIELD_DEFINITION\n\ndirective @onArgumentDefinition on ARGUMENT_DEFINITION\n\ndirective @onInterface on INTERFACE\n\ndirective @onUnion on UNION\n\ndirective @onEnum on ENUM\n\ndirective @onEnumValue on ENUM_VALUE\n\ndirective @onInputObject on INPUT_OBJECT\n\ndirective @onInputFieldDefinition on INPUT_FIELD_DEFINITION\n\ntype Alien implements Being & Intelligent {\n iq: Int\n name(surname: Boolean): String\n numEyes: Int\n}\n\nscalar Any\n\ninterface Being {\n name(surname: Boolean): String\n}\n\ninterface Canine {\n name(surname: Boolean): String\n}\n\ntype Cat implements Being & Pet {\n name(surname: Boolean): String\n nickname: String\n meows: Boolean\n meowVolume: Int\n furColor: FurColor\n}\n\nunion CatOrDog = Dog | Cat\n\ninput ComplexInput {\n requiredField: Boolean!\n intField: Int\n stringField: String\n booleanField: Boolean\n stringListField: [String]\n enumField: FurColor\n nestedInput: SimpleInput}\n\ntype ComplicatedArgs {\n intArgField(intArg: Int): String\n nonNullIntArgField(nonNullIntArg: Int!): String\n stringArgField(stringArg: String): String\n booleanArgField(booleanArg: Boolean): String\n enumArgField(enumArg: FurColor): String\n enumArrayArgField(enumArrayArg: [FurColor!]!): String\n floatArgField(floatArg: Float): String\n idArgField(idArg: ID): String\n stringListArgField(stringListArg: [String]): String\n stringListNonNullArgField(stringListNonNullArg: [String!]): String\n complexArgField(complexArg: ComplexInput): String\n multipleReqs(req1: Int!, req2: Int!): String\n multipleOpts(opt1: Int = 0, opt2: Int = 0): String\n multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int = 0, opt2: Int = 0): String\n}\n\ntype Dog implements Being & Pet & Canine {\n name(surname: Boolean): String\n nickname: String\n barkVolume: Int\n barks: Boolean\n doesKnowCommand(dogCommand: DogCommand): Boolean\n isHousetrained(atOtherHomes: Boolean = true): Boolean\n isAtLocation(x: Int, y: Int): Boolean\n}\n\nenum DogCommand {\n SIT\n HEEL\n DOWN\n}\n\nunion DogOrHuman = Dog | Human\n\nenum FurColor {\n BROWN\n BLACK\n TAN\n SPOTTED\n NO_FUR\n UNKNOWN\n}\n\ntype Human implements Being & Intelligent {\n name(surname: Boolean): String\n pets: [Pet]\n relatives: [Human]\n iq: Int\n}\n\nunion HumanOrAlien = Human | Alien\n\ninterface Intelligent {\n iq: Int\n}\n\nscalar Invalid\n\ninput SimpleInput {\n stringField: String\n stringListField: [String!]\n}\n\ninterface Pet {\n name(surname: Boolean): String\n}\n\ntype QueryRoot {\n human(id: ID): Human\n alien: Alien\n dog: Dog\n cat: Cat\n pet: Pet\n catOrDog: CatOrDog\n dogOrHuman: DogOrHuman\n humanOrAlien: HumanOrAlien\n complicatedArgs: ComplicatedArgs\n invalidArg(arg: Invalid): String\n anyArg(arg: Any): String\n}\n", - "schema {\n query: QueryRoot\n}\n\ntype Connection {\n edges: [Edge]\n}\n\ntype Edge {\n node: Node\n}\n\ntype IntBox implements SomeBox {\n scalar: Int\n deepBox: IntBox\n unrelatedField: String\n listStringBox: [StringBox]\n stringBox: StringBox\n intBox: IntBox\n}\n\ntype Node {\n id: ID\n name: String\n}\n\ninterface NonNullStringBox1 {\n scalar: String!\n}\n\ntype NonNullStringBox1Impl implements SomeBox & NonNullStringBox1 {\n scalar: String!\n unrelatedField: String\n deepBox: SomeBox\n}\n\ninterface NonNullStringBox2 {\n scalar: String!\n}\n\ntype NonNullStringBox2Impl implements SomeBox & NonNullStringBox2 {\n scalar: String!\n unrelatedField: String\n deepBox: SomeBox\n}\n\ntype QueryRoot {\n someBox: SomeBox\n connection: Connection\n}\n\ninterface SomeBox {\n deepBox: SomeBox\n unrelatedField: String\n}\n\ntype StringBox implements SomeBox {\n scalar: String\n deepBox: StringBox\n unrelatedField: String\n listStringBox: [StringBox]\n stringBox: StringBox\n intBox: IntBox\n}\n", - "type Foo {\n constructor: String\n}\n\ntype Query {\n foo: Foo\n}\n" + "interface Pet {\n name: String\n}\n\ntype Dog implements Pet {\n name: String\n nickname: String\n barkVolume: Int\n}\n\ntype Cat implements Pet {\n name: String\n nickname: String\n meowVolume: Int\n}\n\nunion CatOrDog = Cat | Dog\n\ntype Human {\n name: String\n pets: [Pet]\n}\n\ntype Query {\n human: Human\n}", + "schema {\n query: QueryRoot\n}\n\ndirective @onField on FIELD\n\ninterface Mammal {\n mother: Mammal\n father: Mammal\n}\n\ninterface Pet {\n name(surname: Boolean): String\n}\n\ninterface Canine implements Mammal {\n name(surname: Boolean): String\n mother: Canine\n father: Canine\n}\n\nenum DogCommand {\n SIT\n HEEL\n DOWN\n}\n\ntype Dog implements Pet & Mammal & Canine {\n name(surname: Boolean): String\n nickname: String\n barkVolume: Int\n barks: Boolean\n doesKnowCommand(dogCommand: DogCommand): Boolean\n isHouseTrained(atOtherHomes: Boolean = true): Boolean\n isAtLocation(x: Int, y: Int): Boolean\n mother: Dog\n father: Dog\n}\n\ntype Cat implements Pet {\n name(surname: Boolean): String\n nickname: String\n meows: Boolean\n meowsVolume: Int\n furColor: FurColor\n}\n\nunion CatOrDog = Cat | Dog\n\ntype Human {\n name(surname: Boolean): String\n pets: [Pet]\n relatives: [Human]!\n}\n\nenum FurColor {\n BROWN\n BLACK\n TAN\n SPOTTED\n NO_FUR\n UNKNOWN\n}\n\ninput ComplexInput {\n requiredField: Boolean!\n nonNullField: Boolean! = false\n intField: Int\n stringField: String\n booleanField: Boolean\n stringListField: [String]\n}\n\ninput OneOfInput @oneOf {\n stringField: String\n intField: Int\n}\n\ntype ComplicatedArgs {\n intArgField(intArg: Int): String\n nonNullIntArgField(nonNullIntArg: Int!): String\n stringArgField(stringArg: String): String\n booleanArgField(booleanArg: Boolean): String\n enumArgField(enumArg: FurColor): String\n floatArgField(floatArg: Float): String\n idArgField(idArg: ID): String\n stringListArgField(stringListArg: [String]): String\n stringListNonNullArgField(stringListNonNullArg: [String!]): String\n complexArgField(complexArg: ComplexInput): String\n oneOfArgField(oneOfArg: OneOfInput): String\n multipleReqs(req1: Int!, req2: Int!): String\n nonNullFieldWithDefault(arg: Int! = 0): String\n multipleOpts(opt1: Int = 0, opt2: Int = 0): String\n multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int = 0, opt2: Int = 0): String\n}\n\ntype QueryRoot {\n human(id: ID): Human\n dog: Dog\n cat: Cat\n pet: Pet\n catOrDog: CatOrDog\n complicatedArgs: ComplicatedArgs\n}", + "directive @onQuery on QUERY\n\ndirective @onMutation on MUTATION\n\ndirective @onSubscription on SUBSCRIPTION\n\ndirective @onField on FIELD\n\ndirective @onFragmentDefinition on FRAGMENT_DEFINITION\n\ndirective @onFragmentSpread on FRAGMENT_SPREAD\n\ndirective @onInlineFragment on INLINE_FRAGMENT\n\ndirective @onVariableDefinition on VARIABLE_DEFINITION\n\ntype Query {\n dummy: String\n}", + "type Query {\n foo: String\n}", + "type Query {\n someField(a: String, b: String): String\n}", + "input SomeInput {\n a: String\n b: String\n}\n\ntype Query {\n someField(arg: SomeInput): String\n}", + "interface SomeBox {\n deepBox: SomeBox\n unrelatedField: String\n}\n\ntype StringBox implements SomeBox {\n scalar: String\n deepBox: StringBox\n unrelatedField: String\n listStringBox: [StringBox]\n stringBox: StringBox\n intBox: IntBox\n}\n\ntype IntBox implements SomeBox {\n scalar: Int\n deepBox: IntBox\n unrelatedField: String\n listStringBox: [StringBox]\n stringBox: StringBox\n intBox: IntBox\n}\n\ninterface NonNullStringBox1 {\n scalar: String!\n}\n\ntype NonNullStringBox1Impl implements SomeBox & NonNullStringBox1 {\n scalar: String!\n unrelatedField: String\n deepBox: SomeBox\n}\n\ninterface NonNullStringBox2 {\n scalar: String!\n}\n\ntype NonNullStringBox2Impl implements SomeBox & NonNullStringBox2 {\n scalar: String!\n unrelatedField: String\n deepBox: SomeBox\n}\n\ntype Connection {\n edges: [Edge]\n}\n\ntype Edge {\n node: Node\n}\n\ntype Node {\n id: ID\n name: String\n}\n\ntype Query {\n someBox: SomeBox\n connection: Connection\n}", + "type Foo {\n constructor: String\n}\n\ntype Query {\n foo: Foo\n}", + "schema {\n query: QueryRoot\n}\n\ndirective @onField on FIELD\n\ndirective @directive on FIELD | FRAGMENT_DEFINITION\n\ndirective @directiveA on FIELD | FRAGMENT_DEFINITION\n\ndirective @directiveB on FIELD | FRAGMENT_DEFINITION\n\ndirective @repeatable repeatable on FIELD | FRAGMENT_DEFINITION\n\ninterface Mammal {\n mother: Mammal\n father: Mammal\n}\n\ninterface Pet {\n name(surname: Boolean): String\n}\n\ninterface Canine implements Mammal {\n name(surname: Boolean): String\n mother: Canine\n father: Canine\n}\n\nenum DogCommand {\n SIT\n HEEL\n DOWN\n}\n\ntype Dog implements Pet & Mammal & Canine {\n name(surname: Boolean): String\n nickname: String\n barkVolume: Int\n barks: Boolean\n doesKnowCommand(dogCommand: DogCommand): Boolean\n isHouseTrained(atOtherHomes: Boolean = true): Boolean\n isAtLocation(x: Int, y: Int): Boolean\n mother: Dog\n father: Dog\n}\n\ntype Cat implements Pet {\n name(surname: Boolean): String\n nickname: String\n meows: Boolean\n meowsVolume: Int\n furColor: FurColor\n}\n\nunion CatOrDog = Cat | Dog\n\ntype Human {\n name(surname: Boolean): String\n pets: [Pet]\n relatives: [Human]!\n}\n\nenum FurColor {\n BROWN\n BLACK\n TAN\n SPOTTED\n NO_FUR\n UNKNOWN\n}\n\ninput ComplexInput {\n requiredField: Boolean!\n nonNullField: Boolean! = false\n intField: Int\n stringField: String\n booleanField: Boolean\n stringListField: [String]\n}\n\ninput OneOfInput @oneOf {\n stringField: String\n intField: Int\n}\n\ntype ComplicatedArgs {\n intArgField(intArg: Int): String\n nonNullIntArgField(nonNullIntArg: Int!): String\n stringArgField(stringArg: String): String\n booleanArgField(booleanArg: Boolean): String\n enumArgField(enumArg: FurColor): String\n floatArgField(floatArg: Float): String\n idArgField(idArg: ID): String\n stringListArgField(stringListArg: [String]): String\n stringListNonNullArgField(stringListNonNullArg: [String!]): String\n complexArgField(complexArg: ComplexInput): String\n oneOfArgField(oneOfArg: OneOfInput): String\n multipleReqs(req1: Int!, req2: Int!): String\n nonNullFieldWithDefault(arg: Int! = 0): String\n multipleOpts(opt1: Int = 0, opt2: Int = 0): String\n multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int = 0, opt2: Int = 0): String\n}\n\ntype QueryRoot {\n human(id: ID): Human\n dog: Dog\n cat: Cat\n pet: Pet\n catOrDog: CatOrDog\n complicatedArgs: ComplicatedArgs\n}" ], "tests": [ { "name": "Validate: Fields on correct type/Object field selection", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, "query": "\n fragment objectFieldSelection on Dog {\n __typename\n name\n }\n ", "errors": [] }, { "name": "Validate: Fields on correct type/Aliased object field selection", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, "query": "\n fragment aliasedObjectFieldSelection on Dog {\n tn : __typename\n otherName : name\n }\n ", "errors": [] }, { "name": "Validate: Fields on correct type/Interface field selection", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, "query": "\n fragment interfaceFieldSelection on Pet {\n __typename\n name\n }\n ", "errors": [] }, { "name": "Validate: Fields on correct type/Aliased interface field selection", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, "query": "\n fragment interfaceFieldSelection on Pet {\n otherName : name\n }\n ", "errors": [] }, { "name": "Validate: Fields on correct type/Lying alias selection", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, "query": "\n fragment lyingAliasSelection on Dog {\n name : nickname\n }\n ", "errors": [] }, { "name": "Validate: Fields on correct type/Ignores fields on unknown type", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, "query": "\n fragment unknownSelection on UnknownType {\n unknownField\n }\n ", "errors": [] }, { "name": "Validate: Fields on correct type/reports errors when type is known again", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment typeKnownAgain on Pet {\n unknown_pet_field {\n ... on Cat {\n unknown_cat_field\n }\n }\n }", + "query": "\n fragment typeKnownAgain on Pet {\n unknown_pet_field {\n ... on Cat {\n unknown_cat_field\n }\n }\n }\n ", "errors": [ { "message": "Cannot query field \"unknown_pet_field\" on type \"Pet\".", @@ -75,9 +81,9 @@ }, { "name": "Validate: Fields on correct type/Field not defined on fragment", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment fieldNotDefined on Dog {\n meowVolume\n }", + "query": "\n fragment fieldNotDefined on Dog {\n meowVolume\n }\n ", "errors": [ { "message": "Cannot query field \"meowVolume\" on type \"Dog\". Did you mean \"barkVolume\"?", @@ -92,9 +98,9 @@ }, { "name": "Validate: Fields on correct type/Ignores deeply unknown field", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment deepFieldNotDefined on Dog {\n unknown_field {\n deeper_unknown_field\n }\n }", + "query": "\n fragment deepFieldNotDefined on Dog {\n unknown_field {\n deeper_unknown_field\n }\n }\n ", "errors": [ { "message": "Cannot query field \"unknown_field\" on type \"Dog\".", @@ -109,9 +115,9 @@ }, { "name": "Validate: Fields on correct type/Sub-field not defined", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment subFieldNotDefined on Human {\n pets {\n unknown_field\n }\n }", + "query": "\n fragment subFieldNotDefined on Human {\n pets {\n unknown_field\n }\n }\n ", "errors": [ { "message": "Cannot query field \"unknown_field\" on type \"Pet\".", @@ -126,9 +132,9 @@ }, { "name": "Validate: Fields on correct type/Field not defined on inline fragment", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment fieldNotDefined on Pet {\n ... on Dog {\n meowVolume\n }\n }", + "query": "\n fragment fieldNotDefined on Pet {\n ... on Dog {\n meowVolume\n }\n }\n ", "errors": [ { "message": "Cannot query field \"meowVolume\" on type \"Dog\". Did you mean \"barkVolume\"?", @@ -143,9 +149,9 @@ }, { "name": "Validate: Fields on correct type/Aliased field target not defined", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment aliasedFieldTargetNotDefined on Dog {\n volume : mooVolume\n }", + "query": "\n fragment aliasedFieldTargetNotDefined on Dog {\n volume : mooVolume\n }\n ", "errors": [ { "message": "Cannot query field \"mooVolume\" on type \"Dog\". Did you mean \"barkVolume\"?", @@ -160,9 +166,9 @@ }, { "name": "Validate: Fields on correct type/Aliased lying field target not defined", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment aliasedLyingFieldTargetNotDefined on Dog {\n barkVolume : kawVolume\n }", + "query": "\n fragment aliasedLyingFieldTargetNotDefined on Dog {\n barkVolume : kawVolume\n }\n ", "errors": [ { "message": "Cannot query field \"kawVolume\" on type \"Dog\". Did you mean \"barkVolume\"?", @@ -177,9 +183,9 @@ }, { "name": "Validate: Fields on correct type/Not defined on interface", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment notDefinedOnInterface on Pet {\n tailLength\n }", + "query": "\n fragment notDefinedOnInterface on Pet {\n tailLength\n }\n ", "errors": [ { "message": "Cannot query field \"tailLength\" on type \"Pet\".", @@ -194,9 +200,9 @@ }, { "name": "Validate: Fields on correct type/Defined on implementors but not on interface", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment definedOnImplementorsButNotInterface on Pet {\n nickname\n }", + "query": "\n fragment definedOnImplementorsButNotInterface on Pet {\n nickname\n }\n ", "errors": [ { "message": "Cannot query field \"nickname\" on type \"Pet\".", @@ -211,16 +217,16 @@ }, { "name": "Validate: Fields on correct type/Meta field selection on union", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment directFieldSelectionOnUnion on CatOrDog {\n __typename\n }", + "query": "\n fragment directFieldSelectionOnUnion on CatOrDog {\n __typename\n }\n ", "errors": [] }, { "name": "Validate: Fields on correct type/Direct field selection on union", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment directFieldSelectionOnUnion on CatOrDog {\n directField\n }", + "query": "\n fragment directFieldSelectionOnUnion on CatOrDog {\n directField\n }\n ", "errors": [ { "message": "Cannot query field \"directField\" on type \"CatOrDog\".", @@ -235,9 +241,9 @@ }, { "name": "Validate: Fields on correct type/Defined on implementors queried on union", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, - "query": "\n fragment definedOnImplementorsQueriedOnUnion on CatOrDog {\n name\n }", + "query": "\n fragment definedOnImplementorsQueriedOnUnion on CatOrDog {\n name\n }\n ", "errors": [ { "message": "Cannot query field \"name\" on type \"CatOrDog\".", @@ -252,50 +258,57 @@ }, { "name": "Validate: Fields on correct type/valid field in inline fragment", - "rule": "FieldsOnCorrectType", + "rule": "FieldsOnCorrectTypeRule", "schema": 0, "query": "\n fragment objectFieldSelection on Pet {\n ... on Dog {\n name\n }\n ... {\n name\n }\n }\n ", "errors": [] }, { "name": "Validate: Fragments on composite types/object is valid fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment validFragment on Dog {\n barks\n }\n ", "errors": [] }, { "name": "Validate: Fragments on composite types/interface is valid fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment validFragment on Pet {\n name\n }\n ", "errors": [] }, { "name": "Validate: Fragments on composite types/object is valid inline fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment validFragment on Pet {\n ... on Dog {\n barks\n }\n }\n ", "errors": [] }, + { + "name": "Validate: Fragments on composite types/interface is valid inline fragment type", + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, + "query": "\n fragment validFragment on Mammal {\n ... on Canine {\n name\n }\n }\n ", + "errors": [] + }, { "name": "Validate: Fragments on composite types/inline fragment without type is valid", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment validFragment on Pet {\n ... {\n name\n }\n }\n ", "errors": [] }, { "name": "Validate: Fragments on composite types/union is valid fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment validFragment on CatOrDog {\n __typename\n }\n ", "errors": [] }, { "name": "Validate: Fragments on composite types/scalar is invalid fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment scalarFragment on Boolean {\n bad\n }\n ", "errors": [ { @@ -311,8 +324,8 @@ }, { "name": "Validate: Fragments on composite types/enum is invalid fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment scalarFragment on FurColor {\n bad\n }\n ", "errors": [ { @@ -328,8 +341,8 @@ }, { "name": "Validate: Fragments on composite types/input object is invalid fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment inputFragment on ComplexInput {\n stringField\n }\n ", "errors": [ { @@ -345,8 +358,8 @@ }, { "name": "Validate: Fragments on composite types/scalar is invalid inline fragment type", - "rule": "FragmentsOnCompositeTypes", - "schema": 0, + "rule": "FragmentsOnCompositeTypesRule", + "schema": 1, "query": "\n fragment invalidFragment on Pet {\n ... on String {\n barks\n }\n }\n ", "errors": [ { @@ -362,30 +375,30 @@ }, { "name": "Validate: Known directives/with no directives", - "rule": "KnownDirectives", - "schema": 0, + "rule": "KnownDirectivesRule", + "schema": 2, "query": "\n query Foo {\n name\n ...Frag\n }\n\n fragment Frag on Dog {\n name\n }\n ", "errors": [] }, { - "name": "Validate: Known directives/with known directives", - "rule": "KnownDirectives", - "schema": 0, - "query": "\n {\n dog @include(if: true) {\n name\n }\n human @skip(if: false) {\n name\n }\n }\n ", + "name": "Validate: Known directives/with standard directives", + "rule": "KnownDirectivesRule", + "schema": 2, + "query": "\n {\n human @skip(if: false) {\n name\n pets {\n ... on Dog @include(if: true) {\n name\n }\n }\n }\n }\n ", "errors": [] }, { "name": "Validate: Known directives/with unknown directive", - "rule": "KnownDirectives", - "schema": 0, - "query": "\n {\n dog @unknown(directive: \"value\") {\n name\n }\n }\n ", + "rule": "KnownDirectivesRule", + "schema": 2, + "query": "\n {\n human @unknown(directive: \"value\") {\n name\n }\n }\n ", "errors": [ { - "message": "Unknown directive \"unknown\".", + "message": "Unknown directive \"@unknown\".", "locations": [ { "line": 3, - "column": 13 + "column": 15 } ] } @@ -393,33 +406,33 @@ }, { "name": "Validate: Known directives/with many unknown directives", - "rule": "KnownDirectives", - "schema": 0, - "query": "\n {\n dog @unknown(directive: \"value\") {\n name\n }\n human @unknown(directive: \"value\") {\n name\n pets @unknown(directive: \"value\") {\n name\n }\n }\n }\n ", + "rule": "KnownDirectivesRule", + "schema": 2, + "query": "\n {\n __typename @unknown\n human @unknown {\n name\n pets @unknown {\n name\n }\n }\n }\n ", "errors": [ { - "message": "Unknown directive \"unknown\".", + "message": "Unknown directive \"@unknown\".", "locations": [ { "line": 3, - "column": 13 + "column": 20 } ] }, { - "message": "Unknown directive \"unknown\".", + "message": "Unknown directive \"@unknown\".", "locations": [ { - "line": 6, + "line": 4, "column": 15 } ] }, { - "message": "Unknown directive \"unknown\".", + "message": "Unknown directive \"@unknown\".", "locations": [ { - "line": 8, + "line": 6, "column": 16 } ] @@ -428,50 +441,122 @@ }, { "name": "Validate: Known directives/with well placed directives", - "rule": "KnownDirectives", - "schema": 0, - "query": "\n query Foo @onQuery {\n name @include(if: true)\n ...Frag @include(if: true)\n skippedField @skip(if: true)\n ...SkippedFrag @skip(if: true)\n }\n\n mutation Bar @onMutation {\n someField\n }\n ", + "rule": "KnownDirectivesRule", + "schema": 2, + "query": "\n query ($var: Boolean @onVariableDefinition) @onQuery {\n human @onField {\n ...Frag @onFragmentSpread\n ... @onInlineFragment {\n name @onField\n }\n }\n }\n\n mutation @onMutation {\n someField @onField\n }\n\n subscription @onSubscription {\n someField @onField\n }\n\n fragment Frag on Human @onFragmentDefinition {\n name @onField\n }\n ", "errors": [] }, { "name": "Validate: Known directives/with misplaced directives", - "rule": "KnownDirectives", - "schema": 0, - "query": "\n query Foo @include(if: true) {\n name @onQuery\n ...Frag @onQuery\n }\n\n mutation Bar @onQuery {\n someField\n }\n ", + "rule": "KnownDirectivesRule", + "schema": 2, + "query": "\n query ($var: Boolean @onQuery) @onMutation {\n human @onQuery {\n ...Frag @onQuery\n ... @onQuery {\n name @onQuery\n }\n }\n }\n\n mutation @onQuery {\n someField @onQuery\n }\n\n subscription @onQuery {\n someField @onQuery\n }\n\n fragment Frag on Human @onQuery {\n name @onQuery\n }\n ", "errors": [ { - "message": "Directive \"include\" may not be used on QUERY.", + "message": "Directive \"@onQuery\" may not be used on VARIABLE_DEFINITION.", "locations": [ { "line": 2, - "column": 17 + "column": 28 + } + ] + }, + { + "message": "Directive \"@onMutation\" may not be used on QUERY.", + "locations": [ + { + "line": 2, + "column": 38 } ] }, { - "message": "Directive \"onQuery\" may not be used on FIELD.", + "message": "Directive \"@onQuery\" may not be used on FIELD.", "locations": [ { "line": 3, - "column": 14 + "column": 15 } ] }, { - "message": "Directive \"onQuery\" may not be used on FRAGMENT_SPREAD.", + "message": "Directive \"@onQuery\" may not be used on FRAGMENT_SPREAD.", "locations": [ { "line": 4, - "column": 17 + "column": 19 } ] }, { - "message": "Directive \"onQuery\" may not be used on MUTATION.", + "message": "Directive \"@onQuery\" may not be used on INLINE_FRAGMENT.", "locations": [ { - "line": 7, - "column": 20 + "line": 5, + "column": 15 + } + ] + }, + { + "message": "Directive \"@onQuery\" may not be used on FIELD.", + "locations": [ + { + "line": 6, + "column": 18 + } + ] + }, + { + "message": "Directive \"@onQuery\" may not be used on MUTATION.", + "locations": [ + { + "line": 11, + "column": 16 + } + ] + }, + { + "message": "Directive \"@onQuery\" may not be used on FIELD.", + "locations": [ + { + "column": 19, + "line": 12 + } + ] + }, + { + "message": "Directive \"@onQuery\" may not be used on SUBSCRIPTION.", + "locations": [ + { + "column": 20, + "line": 15 + } + ] + }, + { + "message": "Directive \"@onQuery\" may not be used on FIELD.", + "locations": [ + { + "column": 19, + "line": 16 + } + ] + }, + { + "message": "Directive \"@onQuery\" may not be used on FRAGMENT_DEFINITION.", + "locations": [ + { + "column": 30, + "line": 19 + } + ] + }, + { + "message": "Directive \"@onQuery\" may not be used on FIELD.", + "locations": [ + { + "column": 14, + "line": 20 } ] } @@ -479,15 +564,15 @@ }, { "name": "Validate: Known fragment names/known fragment names are valid", - "rule": "KnownFragmentNames", - "schema": 0, + "rule": "KnownFragmentNamesRule", + "schema": 1, "query": "\n {\n human(id: 4) {\n ...HumanFields1\n ... on Human {\n ...HumanFields2\n }\n ... {\n name\n }\n }\n }\n fragment HumanFields1 on Human {\n name\n ...HumanFields3\n }\n fragment HumanFields2 on Human {\n name\n }\n fragment HumanFields3 on Human {\n name\n }\n ", "errors": [] }, { "name": "Validate: Known fragment names/unknown fragment names are invalid", - "rule": "KnownFragmentNames", - "schema": 0, + "rule": "KnownFragmentNamesRule", + "schema": 1, "query": "\n {\n human(id: 4) {\n ...UnknownFragment1\n ... on Human {\n ...UnknownFragment2\n }\n }\n }\n fragment HumanFields on Human {\n name\n ...UnknownFragment3\n }\n ", "errors": [ { @@ -521,23 +606,23 @@ }, { "name": "Validate: Known type names/known type names are valid", - "rule": "KnownTypeNames", - "schema": 0, - "query": "\n query Foo($var: String, $required: [String!]!) {\n user(id: 4) {\n pets { ... on Pet { name }, ...PetFields, ... { name } }\n }\n }\n fragment PetFields on Pet {\n name\n }\n ", + "rule": "KnownTypeNamesRule", + "schema": 1, + "query": "\n query Foo(\n $var: String\n $required: [Int!]!\n $introspectionType: __EnumValue\n ) {\n user(id: 4) {\n pets { ... on Pet { name }, ...PetFields, ... { name } }\n }\n }\n\n fragment PetFields on Pet {\n name\n }\n ", "errors": [] }, { "name": "Validate: Known type names/unknown type names are invalid", - "rule": "KnownTypeNames", - "schema": 0, - "query": "\n query Foo($var: JumbledUpLetters) {\n user(id: 4) {\n name\n pets { ... on Badger { name }, ...PetFields }\n }\n }\n fragment PetFields on Peettt {\n name\n }\n ", + "rule": "KnownTypeNamesRule", + "schema": 1, + "query": "\n query Foo($var: [JumbledUpLetters!]!) {\n user(id: 4) {\n name\n pets { ... on Badger { name }, ...PetFields }\n }\n }\n fragment PetFields on Peat {\n name\n }\n ", "errors": [ { "message": "Unknown type \"JumbledUpLetters\".", "locations": [ { "line": 2, - "column": 23 + "column": 24 } ] }, @@ -551,7 +636,7 @@ ] }, { - "message": "Unknown type \"Peettt\".", + "message": "Unknown type \"Peat\".", "locations": [ { "line": 8, @@ -561,38 +646,73 @@ } ] }, + { + "name": "Validate: Known type names/references to standard scalars that are missing in schema", + "rule": "KnownTypeNamesRule", + "schema": 3, + "query": "\n query ($id: ID, $float: Float, $int: Int) {\n __typename\n }\n ", + "errors": [ + { + "message": "Unknown type \"ID\".", + "locations": [ + { + "line": 2, + "column": 19 + } + ] + }, + { + "message": "Unknown type \"Float\".", + "locations": [ + { + "line": 2, + "column": 31 + } + ] + }, + { + "message": "Unknown type \"Int\".", + "locations": [ + { + "line": 2, + "column": 44 + } + ] + } + ] + }, { "name": "Validate: Anonymous operation must be alone/no operations", - "rule": "LoneAnonymousOperation", - "schema": 0, + "rule": "LoneAnonymousOperationRule", + "schema": 1, "query": "\n fragment fragA on Type {\n field\n }\n ", "errors": [] }, { "name": "Validate: Anonymous operation must be alone/one anon operation", - "rule": "LoneAnonymousOperation", - "schema": 0, + "rule": "LoneAnonymousOperationRule", + "schema": 1, "query": "\n {\n field\n }\n ", "errors": [] }, { "name": "Validate: Anonymous operation must be alone/multiple named operations", - "rule": "LoneAnonymousOperation", - "schema": 0, + "rule": "LoneAnonymousOperationRule", + "schema": 1, "query": "\n query Foo {\n field\n }\n\n query Bar {\n field\n }\n ", "errors": [] }, { "name": "Validate: Anonymous operation must be alone/anon operation with fragment", - "rule": "LoneAnonymousOperation", - "schema": 0, + "rule": "LoneAnonymousOperationRule", + "schema": 1, "query": "\n {\n ...Foo\n }\n fragment Foo on Type {\n field\n }\n ", "errors": [] }, { "name": "Validate: Anonymous operation must be alone/multiple anon operations", - "rule": "LoneAnonymousOperation", - "schema": 0, + "rule": "LoneAnonymousOperationRule", + "schema": 1, "query": "\n {\n fieldA\n }\n {\n fieldB\n }\n ", "errors": [ { @@ -617,8 +737,8 @@ }, { "name": "Validate: Anonymous operation must be alone/anon operation with a mutation", - "rule": "LoneAnonymousOperation", - "schema": 0, + "rule": "LoneAnonymousOperationRule", + "schema": 1, "query": "\n {\n fieldA\n }\n mutation Foo {\n fieldB\n }\n ", "errors": [ { @@ -634,8 +754,8 @@ }, { "name": "Validate: Anonymous operation must be alone/anon operation with a subscription", - "rule": "LoneAnonymousOperation", - "schema": 0, + "rule": "LoneAnonymousOperationRule", + "schema": 1, "query": "\n {\n fieldA\n }\n subscription Foo {\n fieldB\n }\n ", "errors": [ { @@ -651,43 +771,43 @@ }, { "name": "Validate: No circular fragment spreads/single reference is valid", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragB }\n fragment fragB on Dog { name }\n ", "errors": [] }, { "name": "Validate: No circular fragment spreads/spreading twice is not circular", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragB, ...fragB }\n fragment fragB on Dog { name }\n ", "errors": [] }, { "name": "Validate: No circular fragment spreads/spreading twice indirectly is not circular", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragB, ...fragC }\n fragment fragB on Dog { ...fragC }\n fragment fragC on Dog { name }\n ", "errors": [] }, { "name": "Validate: No circular fragment spreads/double spread within abstract types", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment nameFragment on Pet {\n ... on Dog { name }\n ... on Cat { name }\n }\n\n fragment spreadsInAnon on Pet {\n ... on Dog { ...nameFragment }\n ... on Cat { ...nameFragment }\n }\n ", "errors": [] }, { "name": "Validate: No circular fragment spreads/does not false positive on unknown fragment", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment nameFragment on Pet {\n ...UnknownFragment\n }\n ", "errors": [] }, { "name": "Validate: No circular fragment spreads/spreading recursively within field fails", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Human { relatives { ...fragA } },\n ", "errors": [ { @@ -703,8 +823,8 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself directly", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragA }\n ", "errors": [ { @@ -720,8 +840,8 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself directly within inline fragment", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Pet {\n ... on Dog {\n ...fragA\n }\n }\n ", "errors": [ { @@ -737,12 +857,12 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself indirectly", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragB }\n fragment fragB on Dog { ...fragA }\n ", "errors": [ { - "message": "Cannot spread fragment \"fragA\" within itself via fragB.", + "message": "Cannot spread fragment \"fragA\" within itself via \"fragB\".", "locations": [ { "line": 2, @@ -758,12 +878,12 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself indirectly reports opposite order", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragB on Dog { ...fragA }\n fragment fragA on Dog { ...fragB }\n ", "errors": [ { - "message": "Cannot spread fragment \"fragB\" within itself via fragA.", + "message": "Cannot spread fragment \"fragB\" within itself via \"fragA\".", "locations": [ { "line": 2, @@ -779,12 +899,12 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself indirectly within inline fragment", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Pet {\n ... on Dog {\n ...fragB\n }\n }\n fragment fragB on Pet {\n ... on Dog {\n ...fragA\n }\n }\n ", "errors": [ { - "message": "Cannot spread fragment \"fragA\" within itself via fragB.", + "message": "Cannot spread fragment \"fragA\" within itself via \"fragB\".", "locations": [ { "line": 4, @@ -800,12 +920,12 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself deeply", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragB }\n fragment fragB on Dog { ...fragC }\n fragment fragC on Dog { ...fragO }\n fragment fragX on Dog { ...fragY }\n fragment fragY on Dog { ...fragZ }\n fragment fragZ on Dog { ...fragO }\n fragment fragO on Dog { ...fragP }\n fragment fragP on Dog { ...fragA, ...fragX }\n ", "errors": [ { - "message": "Cannot spread fragment \"fragA\" within itself via fragB, fragC, fragO, fragP.", + "message": "Cannot spread fragment \"fragA\" within itself via \"fragB\", \"fragC\", \"fragO\", \"fragP\".", "locations": [ { "line": 2, @@ -830,7 +950,7 @@ ] }, { - "message": "Cannot spread fragment \"fragO\" within itself via fragP, fragX, fragY, fragZ.", + "message": "Cannot spread fragment \"fragO\" within itself via \"fragP\", \"fragX\", \"fragY\", \"fragZ\".", "locations": [ { "line": 8, @@ -858,12 +978,12 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself deeply two paths", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragB, ...fragC }\n fragment fragB on Dog { ...fragA }\n fragment fragC on Dog { ...fragA }\n ", "errors": [ { - "message": "Cannot spread fragment \"fragA\" within itself via fragB.", + "message": "Cannot spread fragment \"fragA\" within itself via \"fragB\".", "locations": [ { "line": 2, @@ -876,7 +996,7 @@ ] }, { - "message": "Cannot spread fragment \"fragA\" within itself via fragC.", + "message": "Cannot spread fragment \"fragA\" within itself via \"fragC\".", "locations": [ { "line": 2, @@ -892,12 +1012,12 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself deeply two paths -- alt traverse order", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragC }\n fragment fragB on Dog { ...fragC }\n fragment fragC on Dog { ...fragA, ...fragB }\n ", "errors": [ { - "message": "Cannot spread fragment \"fragA\" within itself via fragC.", + "message": "Cannot spread fragment \"fragA\" within itself via \"fragC\".", "locations": [ { "line": 2, @@ -910,7 +1030,7 @@ ] }, { - "message": "Cannot spread fragment \"fragC\" within itself via fragB.", + "message": "Cannot spread fragment \"fragC\" within itself via \"fragB\".", "locations": [ { "line": 4, @@ -926,8 +1046,8 @@ }, { "name": "Validate: No circular fragment spreads/no spreading itself deeply and immediately", - "rule": "NoFragmentCycles", - "schema": 0, + "rule": "NoFragmentCyclesRule", + "schema": 1, "query": "\n fragment fragA on Dog { ...fragB }\n fragment fragB on Dog { ...fragB, ...fragC }\n fragment fragC on Dog { ...fragA, ...fragB }\n ", "errors": [ { @@ -940,7 +1060,7 @@ ] }, { - "message": "Cannot spread fragment \"fragA\" within itself via fragB, fragC.", + "message": "Cannot spread fragment \"fragA\" within itself via \"fragB\", \"fragC\".", "locations": [ { "line": 2, @@ -957,7 +1077,7 @@ ] }, { - "message": "Cannot spread fragment \"fragB\" within itself via fragC.", + "message": "Cannot spread fragment \"fragB\" within itself via \"fragC\".", "locations": [ { "line": 3, @@ -973,57 +1093,57 @@ }, { "name": "Validate: No undefined variables/all variables defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n field(a: $a, b: $b, c: $c)\n }\n ", "errors": [] }, { "name": "Validate: No undefined variables/all variables deeply defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n field(a: $a) {\n field(b: $b) {\n field(c: $c)\n }\n }\n }\n ", "errors": [] }, { "name": "Validate: No undefined variables/all variables deeply in inline fragments defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n ... on Type {\n field(a: $a) {\n field(b: $b) {\n ... on Type {\n field(c: $c)\n }\n }\n }\n }\n }\n ", "errors": [] }, { "name": "Validate: No undefined variables/all variables in fragments deeply defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a) {\n ...FragB\n }\n }\n fragment FragB on Type {\n field(b: $b) {\n ...FragC\n }\n }\n fragment FragC on Type {\n field(c: $c)\n }\n ", "errors": [] }, { "name": "Validate: No undefined variables/variable within single fragment defined in multiple operations", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String) {\n ...FragA\n }\n query Bar($a: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a)\n }\n ", "errors": [] }, { "name": "Validate: No undefined variables/variable within fragments defined in operations", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String) {\n ...FragA\n }\n query Bar($b: String) {\n ...FragB\n }\n fragment FragA on Type {\n field(a: $a)\n }\n fragment FragB on Type {\n field(b: $b)\n }\n ", "errors": [] }, { "name": "Validate: No undefined variables/variable within recursive fragment defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a) {\n ...FragA\n }\n }\n ", "errors": [] }, { "name": "Validate: No undefined variables/variable not defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n field(a: $a, b: $b, c: $c, d: $d)\n }\n ", "errors": [ { @@ -1043,8 +1163,8 @@ }, { "name": "Validate: No undefined variables/variable not defined by un-named query", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n {\n field(a: $a)\n }\n ", "errors": [ { @@ -1064,8 +1184,8 @@ }, { "name": "Validate: No undefined variables/multiple variables not defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($b: String) {\n field(a: $a, b: $b, c: $c)\n }\n ", "errors": [ { @@ -1098,8 +1218,8 @@ }, { "name": "Validate: No undefined variables/variable in fragment not defined by un-named query", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a)\n }\n ", "errors": [ { @@ -1119,8 +1239,8 @@ }, { "name": "Validate: No undefined variables/variable in fragment not defined by operation", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a) {\n ...FragB\n }\n }\n fragment FragB on Type {\n field(b: $b) {\n ...FragC\n }\n }\n fragment FragC on Type {\n field(c: $c)\n }\n ", "errors": [ { @@ -1140,8 +1260,8 @@ }, { "name": "Validate: No undefined variables/multiple variables in fragments not defined", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($b: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a) {\n ...FragB\n }\n }\n fragment FragB on Type {\n field(b: $b) {\n ...FragC\n }\n }\n fragment FragC on Type {\n field(c: $c)\n }\n ", "errors": [ { @@ -1174,8 +1294,8 @@ }, { "name": "Validate: No undefined variables/single variable in fragment not defined by multiple operations", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String) {\n ...FragAB\n }\n query Bar($a: String) {\n ...FragAB\n }\n fragment FragAB on Type {\n field(a: $a, b: $b)\n }\n ", "errors": [ { @@ -1208,8 +1328,8 @@ }, { "name": "Validate: No undefined variables/variables in fragment not defined by multiple operations", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($b: String) {\n ...FragAB\n }\n query Bar($a: String) {\n ...FragAB\n }\n fragment FragAB on Type {\n field(a: $a, b: $b)\n }\n ", "errors": [ { @@ -1242,8 +1362,8 @@ }, { "name": "Validate: No undefined variables/variable in fragment used by other operation", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($b: String) {\n ...FragA\n }\n query Bar($a: String) {\n ...FragB\n }\n fragment FragA on Type {\n field(a: $a)\n }\n fragment FragB on Type {\n field(b: $b)\n }\n ", "errors": [ { @@ -1276,8 +1396,8 @@ }, { "name": "Validate: No undefined variables/multiple undefined variables produce multiple errors", - "rule": "NoUndefinedVariables", - "schema": 0, + "rule": "NoUndefinedVariablesRule", + "schema": 1, "query": "\n query Foo($b: String) {\n ...FragAB\n }\n query Bar($a: String) {\n ...FragAB\n }\n fragment FragAB on Type {\n field1(a: $a, b: $b)\n ...FragC\n field3(a: $a, b: $b)\n }\n fragment FragC on Type {\n field2(c: $c)\n }\n ", "errors": [ { @@ -1362,22 +1482,22 @@ }, { "name": "Validate: No unused fragments/all fragment names are used", - "rule": "NoUnusedFragments", - "schema": 0, + "rule": "NoUnusedFragmentsRule", + "schema": 1, "query": "\n {\n human(id: 4) {\n ...HumanFields1\n ... on Human {\n ...HumanFields2\n }\n }\n }\n fragment HumanFields1 on Human {\n name\n ...HumanFields3\n }\n fragment HumanFields2 on Human {\n name\n }\n fragment HumanFields3 on Human {\n name\n }\n ", "errors": [] }, { "name": "Validate: No unused fragments/all fragment names are used by multiple operations", - "rule": "NoUnusedFragments", - "schema": 0, + "rule": "NoUnusedFragmentsRule", + "schema": 1, "query": "\n query Foo {\n human(id: 4) {\n ...HumanFields1\n }\n }\n query Bar {\n human(id: 4) {\n ...HumanFields2\n }\n }\n fragment HumanFields1 on Human {\n name\n ...HumanFields3\n }\n fragment HumanFields2 on Human {\n name\n }\n fragment HumanFields3 on Human {\n name\n }\n ", "errors": [] }, { "name": "Validate: No unused fragments/contains unknown fragments", - "rule": "NoUnusedFragments", - "schema": 0, + "rule": "NoUnusedFragmentsRule", + "schema": 1, "query": "\n query Foo {\n human(id: 4) {\n ...HumanFields1\n }\n }\n query Bar {\n human(id: 4) {\n ...HumanFields2\n }\n }\n fragment HumanFields1 on Human {\n name\n ...HumanFields3\n }\n fragment HumanFields2 on Human {\n name\n }\n fragment HumanFields3 on Human {\n name\n }\n fragment Unused1 on Human {\n name\n }\n fragment Unused2 on Human {\n name\n }\n ", "errors": [ { @@ -1402,8 +1522,8 @@ }, { "name": "Validate: No unused fragments/contains unknown fragments with ref cycle", - "rule": "NoUnusedFragments", - "schema": 0, + "rule": "NoUnusedFragmentsRule", + "schema": 1, "query": "\n query Foo {\n human(id: 4) {\n ...HumanFields1\n }\n }\n query Bar {\n human(id: 4) {\n ...HumanFields2\n }\n }\n fragment HumanFields1 on Human {\n name\n ...HumanFields3\n }\n fragment HumanFields2 on Human {\n name\n }\n fragment HumanFields3 on Human {\n name\n }\n fragment Unused1 on Human {\n name\n ...Unused2\n }\n fragment Unused2 on Human {\n name\n ...Unused1\n }\n ", "errors": [ { @@ -1428,8 +1548,8 @@ }, { "name": "Validate: No unused fragments/contains unknown and undef fragments", - "rule": "NoUnusedFragments", - "schema": 0, + "rule": "NoUnusedFragmentsRule", + "schema": 1, "query": "\n query Foo {\n human(id: 4) {\n ...bar\n }\n }\n fragment foo on Human {\n name\n }\n ", "errors": [ { @@ -1445,183 +1565,50 @@ }, { "name": "Validate: No unused variables/uses all variables", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query ($a: String, $b: String, $c: String) {\n field(a: $a, b: $b, c: $c)\n }\n ", "errors": [] }, { "name": "Validate: No unused variables/uses all variables deeply", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n field(a: $a) {\n field(b: $b) {\n field(c: $c)\n }\n }\n }\n ", "errors": [] }, { - "name": "Validate: No invalid default String variable values", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: String = -\"\") {\n field(a: $a)\n }\n ", - "errors": [ - { - "message": "Variable \"$a\" of type \"String\" has invalid default value -\"\".\nExpected type \"String\", found -\"\".", - "locations": [ - { - "line": 2, - "column": 30 - } - ] - } - ] - }, - { - "name": "Validate: No invalid default Int variable values/bad input", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: Int = -\"\") {\n field(a: $a)\n }\n ", - "errors": [ - { - "message": "Variable \"$a\" of type \"Int\" has invalid default value -\"\".\nExpected type \"Int\", found -\"\".", - "locations": [ - { - "line": 2, - "column": 27 - } - ] - } - ] - }, - { - "name": "Validate: No invalid default Int variable values/value out of range", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: Int = -2147483649) {\n field(a: $a)\n }\n ", - "errors": [ - { - "message": "Variable \"$a\" of type \"Int\" has invalid default value -2147483649.\nExpected type \"Int\", found -2147483649.", - "locations": [ - { - "line": 2, - "column": 27 - } - ] - } - ] - }, - { - "name": "Validate: No invalid default Float variable values", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: Float = -\"\") {\n field(a: $a)\n }\n ", - "errors": [ - { - "message": "Variable \"$a\" of type \"Float\" has invalid default value -\"\".\nExpected type \"Float\", found -\"\".", - "locations": [ - { - "line": 2, - "column": 29 - } - ] - } - ] - }, - { - "name": "Validate: Default Float variable set to zero", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: Float = 0.0) {\n field(a: $a)\n }\n ", - "errors": [] - }, - { - "name": "Validate: No invalid default Float variable values/value out of range", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: Float = 1.8e+308) {\n field(a: $a)\n }\n ", - "errors": [ - { - "message": "Variable \"$a\" of type \"Float\" has invalid default value 1.8e+308.\nExpected type \"Float\", found 1.8e+308.", - "locations": [ - { - "line": 2, - "column": 29 - } - ] - } - ] - }, - { - "name": "Validate: No invalid default Boolean variable values", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: Boolean = \"false\") {\n field(a: $a)\n }\n ", - "errors": [ - { - "message": "Variable \"$a\" of type \"Boolean\" has invalid default value \"false\".\nExpected type \"Boolean\", found \"false\".", - "locations": [ - { - "line": 2, - "column": 31 - } - ] - } - ] - }, - { - "name": "Validate: No invalid default ID variable values", - "rule": "DefaultValuesOfCorrectType", - "schema": 0, - "query": "\n query Foo($a: ID = false) {\n field(a: $a)\n }\n ", - "errors": [ - { - "message": "Variable \"$a\" of type \"ID\" has invalid default value false.\nExpected type \"ID\", found false.", - "locations": [ - { - "line": 2, - "column": 26 - } - ] - } - ] - }, - { - "name": "Validate: No unused variables/uses all variables deeply in inline fragments", - "rule": "NoUnusedVariables", - "schema": 0, - "query": "\n query Foo($a: String, $b: String, $c: String) {\n ... on Type {\n field(a: $a) {\n field(b: $b) {\n ... on Type {\n field(c: $c)\n }\n }\n }\n }\n }\n ", - "errors": [] - }, - { - "name": "Validate: fragments are used even when they are nested", - "rule": "NoUnusedFragments", - "schema": 1, - "query": "\n query Foo() {\n ...StringFragment\n stringBox {\n ...StringFragment\n ...StringFragmentPrime\n}\n}\n\n\n fragment StringFragment on StringBox {\n scalar\n}\n\n fragment StringFragmentPrime on StringBox {\n unrelatedField\n}\n", - "errors": [] + "name": "Validate: No unused variables/uses all variables deeply in inline fragments", + "rule": "NoUnusedVariablesRule", + "schema": 1, + "query": "\n query Foo($a: String, $b: String, $c: String) {\n ... on Type {\n field(a: $a) {\n field(b: $b) {\n ... on Type {\n field(c: $c)\n }\n }\n }\n }\n }\n ", + "errors": [] }, { "name": "Validate: No unused variables/uses all variables in fragments", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a) {\n ...FragB\n }\n }\n fragment FragB on Type {\n field(b: $b) {\n ...FragC\n }\n }\n fragment FragC on Type {\n field(c: $c)\n }\n ", "errors": [] }, { "name": "Validate: No unused variables/variable used by fragment in multiple operations", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String) {\n ...FragA\n }\n query Bar($b: String) {\n ...FragB\n }\n fragment FragA on Type {\n field(a: $a)\n }\n fragment FragB on Type {\n field(b: $b)\n }\n ", "errors": [] }, { "name": "Validate: No unused variables/variable used by recursive fragment", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a) {\n ...FragA\n }\n }\n ", "errors": [] }, { "name": "Validate: No unused variables/variable not used", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query ($a: String, $b: String, $c: String) {\n field(a: $a, b: $b)\n }\n ", "errors": [ { @@ -1637,8 +1624,8 @@ }, { "name": "Validate: No unused variables/multiple variables not used", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n field(b: $b)\n }\n ", "errors": [ { @@ -1663,8 +1650,8 @@ }, { "name": "Validate: No unused variables/variable not used in fragments", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a) {\n ...FragB\n }\n }\n fragment FragB on Type {\n field(b: $b) {\n ...FragC\n }\n }\n fragment FragC on Type {\n field\n }\n ", "errors": [ { @@ -1680,8 +1667,8 @@ }, { "name": "Validate: No unused variables/multiple variables not used in fragments", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: String, $c: String) {\n ...FragA\n }\n fragment FragA on Type {\n field {\n ...FragB\n }\n }\n fragment FragB on Type {\n field(b: $b) {\n ...FragC\n }\n }\n fragment FragC on Type {\n field\n }\n ", "errors": [ { @@ -1706,8 +1693,8 @@ }, { "name": "Validate: No unused variables/variable not used by unreferenced fragment", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($b: String) {\n ...FragA\n }\n fragment FragA on Type {\n field(a: $a)\n }\n fragment FragB on Type {\n field(b: $b)\n }\n ", "errors": [ { @@ -1723,8 +1710,8 @@ }, { "name": "Validate: No unused variables/variable not used by fragment used by other operation", - "rule": "NoUnusedVariables", - "schema": 0, + "rule": "NoUnusedVariablesRule", + "schema": 1, "query": "\n query Foo($b: String) {\n ...FragA\n }\n query Bar($a: String) {\n ...FragB\n }\n fragment FragA on Type {\n field(a: $a)\n }\n fragment FragB on Type {\n field(b: $b)\n }\n ", "errors": [ { @@ -1748,323 +1735,202 @@ ] }, { - "name": "Validate: Arguments have valid type/valid enum constant in query", - "rule": "ArgumentsOfCorrectType", - "schema": 0, - "query": "\n query Query {\n complicatedArgs {\n enumArgField(enumArg: BROWN)\n }\n }\n ", + "name": "Validate: Overlapping fields can be merged/unique fields", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment uniqueFields on Dog {\n name\n nickname\n }\n ", "errors": [] }, { - "name": "Validate: Arguments have valid type/invalid enum constant in query text", - "rule": "ArgumentsOfCorrectType", - "schema": 0, - "query": "\n query Query {\n complicatedArgs {\n enumArgField(enumArg: RAINBOW)\n }\n }\n ", - "errors": [ - { - "message": "Argument \"enumArg\" has invalid value RAINBOW.\nExpected type \"FurColor\", found RAINBOW.", - "locations": [ - { - "line": 4, - "column": 33 - } - ] - } - ] + "name": "Validate: Overlapping fields can be merged/identical fields", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment mergeIdenticalFields on Dog {\n name\n name\n }\n ", + "errors": [] }, { - "name": "Validate: Arguments have valid type/optional enum constant in query", - "rule": "ArgumentsOfCorrectType", - "schema": 0, - "query": "\n query Query {\n complicatedArgs {\n enumArgField()\n }\n }\n ", + "name": "Validate: Overlapping fields can be merged/identical fields with identical args", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment mergeIdenticalFieldsWithIdenticalArgs on Dog {\n doesKnowCommand(dogCommand: SIT)\n doesKnowCommand(dogCommand: SIT)\n }\n ", "errors": [] }, { - "name": "Validate: Variables have valid type/valid enum constant in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($color: FurColor) {\n complicatedArgs {\n enumArgField(enumArg: $color)\n }\n }\n ", - "vars": { - "color": "BROWN" - }, + "name": "Validate: Overlapping fields can be merged/identical fields with identical directives", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment mergeSameFieldsWithSameDirectives on Dog {\n name @include(if: true)\n name @include(if: true)\n }\n ", "errors": [] }, { - "name": "Validate: Variables have valid type/invalid enum constant in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($color: FurColor) {\n complicatedArgs {\n enumArgField(enumArg: $color)\n }\n }\n ", - "vars": { - "color": "RAINBOW" - }, - "errors": [ - { - "message": "Variable \"color\" has invalid value RAINBOW.\nExpected type \"FurColor\", found RAINBOW.", - "locations": [ - { - "line": 2, - "column": 19 - } - ] - } - ] + "name": "Validate: Overlapping fields can be merged/different args with different aliases", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment differentArgsWithDifferentAliases on Dog {\n knowsSit: doesKnowCommand(dogCommand: SIT)\n knowsDown: doesKnowCommand(dogCommand: DOWN)\n }\n ", + "errors": [] }, { - "name": "Validate: Variables have valid type/optional enum constant variable null", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($color: FurColor) {\n complicatedArgs {\n enumArgField(enumArg: $color)\n }\n }\n ", - "vars": { - "color": null - }, + "name": "Validate: Overlapping fields can be merged/different directives with different aliases", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment differentDirectivesWithDifferentAliases on Dog {\n nameIfTrue: name @include(if: true)\n nameIfFalse: name @include(if: false)\n }\n ", "errors": [] }, { - "name": "Validate: Variables have valid type/list with single value in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($stringListArg: [String!])\n {\n stringListArgField(stringListArg: $stringListArg)\n }\n ", - "vars": { - "stringListArg": "single value" - }, + "name": "Validate: Overlapping fields can be merged/different skip/include directives accepted", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment differentDirectivesWithDifferentAliases on Dog {\n name @include(if: true)\n name @include(if: false)\n }\n ", "errors": [] }, { - "name": "Validate: Variables have valid type/list with list value in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($stringListArg: [String!])\n {\n stringListArgField(stringListArg: $stringListArg)\n }\n ", - "vars": { - "stringListArg": ["first value", "second value"] - }, + "name": "Validate: Overlapping fields can be merged/Same stream directives supported", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment differentDirectivesWithDifferentAliases on Dog {\n name @stream(label: \"streamLabel\", initialCount: 1)\n name @stream(label: \"streamLabel\", initialCount: 1)\n }\n ", "errors": [] }, { - "name": "Validate: Variables have valid type/input type with invalid input in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($complexVar: ComplexInput)\n {\n complicatedArgs {\n complexArgField(complexArg: $complexVar)\n }\n }\n ", - "vars": { - "complexVar": "not input" - }, + "name": "Validate: Overlapping fields can be merged/different stream directive label", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n name @stream(label: \"streamLabel\", initialCount: 1)\n name @stream(label: \"anotherLabel\", initialCount: 1)\n }\n ", "errors": [ { - "message": "Variable \"complexVar\" has invalid type string.\nExpected type \"ComplexInput\", found not input.", + "message": "Fields \"name\" conflict because they have differing stream directives. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { - "line": 2, - "column": 19 + "line": 3, + "column": 9 + }, + { + "line": 4, + "column": 9 } ] } ] }, { - "name": "Validate: Variables have valid type/input type with invalid enum constant in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($complexVar: ComplexInput)\n {\n complicatedArgs {\n complexArgField(complexArg: $complexVar)\n }\n }\n ", - "vars": { - "complexVar": { - "requiredField": true, - "enumField": "RAINBOW" - } - }, + "name": "Validate: Overlapping fields can be merged/different stream directive initialCount", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n name @stream(label: \"streamLabel\", initialCount: 1)\n name @stream(label: \"streamLabel\", initialCount: 2)\n }\n ", "errors": [ { - "message": "Variable \"enumField\" has invalid value RAINBOW.\nExpected type \"FurColor\", found RAINBOW.", + "message": "Fields \"name\" conflict because they have differing stream directives. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { - "line": 73, - "column": 3 + "line": 3, + "column": 9 + }, + { + "line": 4, + "column": 9 } ] } ] }, { - "name": "Validate: Variables have valid type/input type with optional enum constant variable null", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($complexVar: ComplexInput)\n {\n complicatedArgs {\n complexArgField(complexArg: $complexVar)\n }\n }\n ", - "vars": { - "complexVar": { - "requiredField": true, - "enumField": null - } - }, - "errors": [] - }, - { - "name": "Validate: Variables have valid type/input type with nested input string from variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($complexVar: ComplexInput)\n {\n complicatedArgs {\n complexArgField(complexArg: $complexVar)\n }\n }\n ", - "vars": { - "complexVar": { - "requiredField": true, - "nestedInput": { - "stringField": "something" - } - } - }, - "errors": [] - }, - { - "name": "Validate: Variables have valid type/input type with nested input string list with single value from variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($complexVar: ComplexInput)\n {\n complicatedArgs {\n complexArgField(complexArg: $complexVar)\n }\n }\n ", - "vars": { - "complexVar": { - "requiredField": true, - "nestedInput": { - "stringListField": "something" - } - } - }, - "errors": [] - }, - { - "name": "Validate: Variables have valid type/input type with nested input string list from variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($complexVar: ComplexInput)\n {\n complicatedArgs {\n complexArgField(complexArg: $complexVar)\n }\n }\n ", - "vars": { - "complexVar": { - "requiredField": true, - "nestedInput": { - "stringListField": ["first", "second"] - } + "name": "Validate: Overlapping fields can be merged/different stream directive first missing args", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n name @stream\n name @stream(label: \"streamLabel\", initialCount: 1)\n }\n ", + "errors": [ + { + "message": "Fields \"name\" conflict because they have differing stream directives. Use different aliases on the fields to fetch both if this was intentional.", + "locations": [ + { + "line": 3, + "column": 9 + }, + { + "line": 4, + "column": 9 + } + ] } - }, - "errors": [] + ] }, { - "name": "Validate: Variables have valid type/number as enum", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($color: FurColor) {\n complicatedArgs {\n enumArgField(enumArg: $color)\n }\n }\n ", - "vars": { - "color": 42 - }, + "name": "Validate: Overlapping fields can be merged/different stream directive second missing args", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n name @stream(label: \"streamLabel\", initialCount: 1)\n name @stream\n }\n ", "errors": [ { - "message": "Variable \"color\" has invalid type float64.\nExpected type \"FurColor\", found 42.", + "message": "Fields \"name\" conflict because they have differing stream directives. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { - "line": 2, - "column": 19 + "line": 3, + "column": 9 + }, + { + "line": 4, + "column": 9 } ] } ] }, { - "name": "Validate: Variables have valid type/valid enum array constant in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($colors: [FurColor!]!) {\n complicatedArgs {\n enumArrayArgField(enumArrayArg: $colors)\n }\n }\n ", - "vars": { - "colors": ["BROWN", "BLACK", "SPOTTED"] - }, - "errors": [] - }, - { - "name": "Validate: Variables have valid type/invalid enum array constant in variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($colors: [FurColor!]!) {\n complicatedArgs {\n enumArrayArgField(enumArrayArg: $colors)\n }\n }\n ", - "vars": { - "colors": ["TEAL", "AUBERGINE"] - }, + "name": "Validate: Overlapping fields can be merged/different stream directive extra argument", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n name @stream(label: \"streamLabel\", initialCount: 1)\n name @stream(label: \"streamLabel\", initialCount: 1, extraArg: true)\n }\n ", "errors": [ { - "message": "Variable \"colors\" has invalid value TEAL.\nExpected type \"FurColor\", found TEAL.", + "message": "Fields \"name\" conflict because they have differing stream directives. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { - "line": 2, - "column": 19 + "line": 3, + "column": 9 + }, + { + "line": 4, + "column": 9 } ] - }, + } + ] + }, + { + "name": "Validate: Overlapping fields can be merged/mix of stream and no stream", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n name @stream\n name\n }\n ", + "errors": [ { - "message": "Variable \"colors\" has invalid value AUBERGINE.\nExpected type \"FurColor\", found AUBERGINE.", + "message": "Fields \"name\" conflict because they have differing stream directives. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { - "line": 2, - "column": 19 + "line": 3, + "column": 9 + }, + { + "line": 4, + "column": 9 } ] } ] }, { - "name": "Validate: Variables have valid type/string as enum array variable", - "rule": "VariablesOfCorrectType", - "schema": 0, - "query": "\n query Query($colors: [FurColor!]!) {\n complicatedArgs {\n enumArrayArgField(enumArrayArg: $colors)\n }\n }\n ", - "vars": { - "colors": "BROWN" - }, - "errors": [] - }, - { - "name": "Validate: Overlapping fields can be merged/unique fields", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment uniqueFields on Dog {\n name\n nickname\n }\n ", - "errors": [] - }, - { - "name": "Validate: Overlapping fields can be merged/identical fields", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment mergeIdenticalFields on Dog {\n name\n name\n }\n ", - "errors": [] - }, - { - "name": "Validate: Overlapping fields can be merged/identical fields with identical args", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment mergeIdenticalFieldsWithIdenticalArgs on Dog {\n doesKnowCommand(dogCommand: SIT)\n doesKnowCommand(dogCommand: SIT)\n }\n ", - "errors": [] - }, - { - "name": "Validate: Overlapping fields can be merged/identical fields with identical directives", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment mergeSameFieldsWithSameDirectives on Dog {\n name @include(if: true)\n name @include(if: true)\n }\n ", - "errors": [] - }, - { - "name": "Validate: Overlapping fields can be merged/different args with different aliases", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment differentArgsWithDifferentAliases on Dog {\n knowsSit: doesKnowCommand(dogCommand: SIT)\n knowsDown: doesKnowCommand(dogCommand: DOWN)\n }\n ", - "errors": [] - }, - { - "name": "Validate: Overlapping fields can be merged/different directives with different aliases", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment differentDirectivesWithDifferentAliases on Dog {\n nameIfTrue: name @include(if: true)\n nameIfFalse: name @include(if: false)\n }\n ", - "errors": [] - }, - { - "name": "Validate: Overlapping fields can be merged/different skip/include directives accepted", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment differentDirectivesWithDifferentAliases on Dog {\n name @include(if: true)\n name @include(if: false)\n }\n ", + "name": "Validate: Overlapping fields can be merged/different stream directive both missing args", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n name @stream\n name @stream\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/Same aliases with different field targets", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment sameAliasesWithDifferentFieldTargets on Dog {\n fido: name\n fido: nickname\n }\n ", "errors": [ { - "message": "Fields \"fido\" conflict because name and nickname are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"fido\" conflict because \"name\" and \"nickname\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 3, @@ -2080,19 +1946,19 @@ }, { "name": "Validate: Overlapping fields can be merged/Same aliases allowed on non-overlapping fields", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment sameAliasesWithDifferentFieldTargets on Pet {\n ... on Dog {\n name\n }\n ... on Cat {\n name: nickname\n }\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/Alias masking direct field access", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment aliasMaskingDirectFieldAccess on Dog {\n name: nickname\n name\n }\n ", "errors": [ { - "message": "Fields \"name\" conflict because nickname and name are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"name\" conflict because \"nickname\" and \"name\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 3, @@ -2108,8 +1974,8 @@ }, { "name": "Validate: Overlapping fields can be merged/different args, second adds an argument", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment conflictingArgs on Dog {\n doesKnowCommand\n doesKnowCommand(dogCommand: HEEL)\n }\n ", "errors": [ { @@ -2129,8 +1995,8 @@ }, { "name": "Validate: Overlapping fields can be merged/different args, second missing an argument", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment conflictingArgs on Dog {\n doesKnowCommand(dogCommand: SIT)\n doesKnowCommand\n }\n ", "errors": [ { @@ -2149,9 +2015,9 @@ ] }, { - "name": "Validate: Overlapping fields can be merged/conflicting args", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "name": "Validate: Overlapping fields can be merged/conflicting arg values", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment conflictingArgs on Dog {\n doesKnowCommand(dogCommand: SIT)\n doesKnowCommand(dogCommand: HEEL)\n }\n ", "errors": [ { @@ -2169,21 +2035,56 @@ } ] }, + { + "name": "Validate: Overlapping fields can be merged/conflicting arg names", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n fragment conflictingArgs on Dog {\n isAtLocation(x: 0)\n isAtLocation(y: 0)\n }\n ", + "errors": [ + { + "message": "Fields \"isAtLocation\" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.", + "locations": [ + { + "line": 3, + "column": 9 + }, + { + "line": 4, + "column": 9 + } + ] + } + ] + }, { "name": "Validate: Overlapping fields can be merged/allows different args where no conflict is possible", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment conflictingArgs on Pet {\n ... on Dog {\n name(surname: true)\n }\n ... on Cat {\n name\n }\n }\n ", "errors": [] }, + { + "name": "Validate: Overlapping fields can be merged/allows different order of args", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 4, + "query": "\n {\n someField(a: null, b: null)\n someField(b: null, a: null)\n }\n ", + "errors": [] + }, + { + "name": "Validate: Overlapping fields can be merged/allows different order of input object fields in arg values", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 5, + "query": "\n {\n someField(arg: { a: null, b: null })\n someField(arg: { b: null, a: null })\n }\n ", + "errors": [] + }, { "name": "Validate: Overlapping fields can be merged/encounters conflict in fragments", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n ...A\n ...B\n }\n fragment A on Type {\n x: a\n }\n fragment B on Type {\n x: b\n }\n ", "errors": [ { - "message": "Fields \"x\" conflict because a and b are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"x\" conflict because \"a\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 7, @@ -2199,12 +2100,12 @@ }, { "name": "Validate: Overlapping fields can be merged/reports each conflict once", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n f1 {\n ...A\n ...B\n }\n f2 {\n ...B\n ...A\n }\n f3 {\n ...A\n ...B\n x: c\n }\n }\n fragment A on Type {\n x: a\n }\n fragment B on Type {\n x: b\n }\n ", "errors": [ { - "message": "Fields \"x\" conflict because a and b are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"x\" conflict because \"a\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 18, @@ -2217,7 +2118,7 @@ ] }, { - "message": "Fields \"x\" conflict because c and a are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"x\" conflict because \"c\" and \"a\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 14, @@ -2230,7 +2131,7 @@ ] }, { - "message": "Fields \"x\" conflict because c and b are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"x\" conflict because \"c\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 14, @@ -2246,12 +2147,12 @@ }, { "name": "Validate: Overlapping fields can be merged/deep conflict", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n field {\n x: a\n },\n field {\n x: b\n }\n }\n ", "errors": [ { - "message": "Fields \"field\" conflict because subfields \"x\" conflict because a and b are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"field\" conflict because subfields \"x\" conflict because \"a\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 3, @@ -2275,12 +2176,12 @@ }, { "name": "Validate: Overlapping fields can be merged/deep conflict with multiple issues", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n field {\n x: a\n y: c\n },\n field {\n x: b\n y: d\n }\n }\n ", "errors": [ { - "message": "Fields \"field\" conflict because subfields \"x\" conflict because a and b are different fields and subfields \"y\" conflict because c and d are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"field\" conflict because subfields \"x\" conflict because \"a\" and \"b\" are different fields and subfields \"y\" conflict because \"c\" and \"d\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 3, @@ -2312,12 +2213,12 @@ }, { "name": "Validate: Overlapping fields can be merged/very deep conflict", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n field {\n deepField {\n x: a\n }\n },\n field {\n deepField {\n x: b\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"field\" conflict because subfields \"deepField\" conflict because subfields \"x\" conflict because a and b are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"field\" conflict because subfields \"deepField\" conflict because subfields \"x\" conflict because \"a\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 3, @@ -2349,12 +2250,12 @@ }, { "name": "Validate: Overlapping fields can be merged/reports deep conflict to nearest common ancestor", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n field {\n deepField {\n x: a\n }\n deepField {\n x: b\n }\n },\n field {\n deepField {\n y\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"deepField\" conflict because subfields \"x\" conflict because a and b are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"deepField\" conflict because subfields \"x\" conflict because \"a\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 4, @@ -2378,12 +2279,12 @@ }, { "name": "Validate: Overlapping fields can be merged/reports deep conflict to nearest common ancestor in fragments", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n field {\n ...F\n }\n field {\n ...F\n }\n }\n fragment F on T {\n deepField {\n deeperField {\n x: a\n }\n deeperField {\n x: b\n }\n },\n deepField {\n deeperField {\n y\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"deeperField\" conflict because subfields \"x\" conflict because a and b are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"deeperField\" conflict because subfields \"x\" conflict because \"a\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 12, @@ -2407,12 +2308,12 @@ }, { "name": "Validate: Overlapping fields can be merged/reports deep conflict in nested fragments", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n {\n field {\n ...F\n }\n field {\n ...I\n }\n }\n fragment F on T {\n x: a\n ...G\n }\n fragment G on T {\n y: c\n }\n fragment I on T {\n y: d\n ...J\n }\n fragment J on T {\n x: b\n }\n ", "errors": [ { - "message": "Fields \"field\" conflict because subfields \"x\" conflict because a and b are different fields and subfields \"y\" conflict because c and d are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"field\" conflict because subfields \"x\" conflict because \"a\" and \"b\" are different fields and subfields \"y\" conflict because \"c\" and \"d\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 3, @@ -2444,27 +2345,27 @@ }, { "name": "Validate: Overlapping fields can be merged/ignores unknown fragments", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n {\n field\n ...Unknown\n ...Known\n }\n\n fragment Known on T {\n field\n ...OtherUnknown\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n {\n field\n ...Unknown\n ...Known\n }\n\n fragment Known on T {\n field\n ...OtherUnknown\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/conflicting return types which potentially overlap", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ...on IntBox {\n scalar\n }\n ...on NonNullStringBox1 {\n scalar\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ...on IntBox {\n scalar\n }\n ...on NonNullStringBox1 {\n scalar\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"scalar\" conflict because they return conflicting types Int and String!. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"scalar\" conflict because they return conflicting types \"Int\" and \"String!\". Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 5, - "column": 15 + "column": 17 }, { "line": 8, - "column": 15 + "column": 17 } ] } @@ -2472,27 +2373,27 @@ }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/compatible return shapes on different return types", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ... on SomeBox {\n deepBox {\n unrelatedField\n }\n }\n ... on StringBox {\n deepBox {\n unrelatedField\n }\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ... on SomeBox {\n deepBox {\n unrelatedField\n }\n }\n ... on StringBox {\n deepBox {\n unrelatedField\n }\n }\n }\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/disallows differing return types despite no overlap", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ... on IntBox {\n scalar\n }\n ... on StringBox {\n scalar\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ... on IntBox {\n scalar\n }\n ... on StringBox {\n scalar\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"scalar\" conflict because they return conflicting types Int and String. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"scalar\" conflict because they return conflicting types \"Int\" and \"String\". Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 5, - "column": 15 + "column": 17 }, { "line": 8, - "column": 15 + "column": 17 } ] } @@ -2500,20 +2401,20 @@ }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/disallows differing return type nullability despite no overlap", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ... on NonNullStringBox1 {\n scalar\n }\n ... on StringBox {\n scalar\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ... on NonNullStringBox1 {\n scalar\n }\n ... on StringBox {\n scalar\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"scalar\" conflict because they return conflicting types String! and String. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"scalar\" conflict because they return conflicting types \"String!\" and \"String\". Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 5, - "column": 15 + "column": 17 }, { "line": 8, - "column": 15 + "column": 17 } ] } @@ -2521,20 +2422,20 @@ }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/disallows differing return type list despite no overlap", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ... on IntBox {\n box: listStringBox {\n scalar\n }\n }\n ... on StringBox {\n box: stringBox {\n scalar\n }\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ... on IntBox {\n box: listStringBox {\n scalar\n }\n }\n ... on StringBox {\n box: stringBox {\n scalar\n }\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"box\" conflict because they return conflicting types [StringBox] and StringBox. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"box\" conflict because they return conflicting types \"[StringBox]\" and \"StringBox\". Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 5, - "column": 15 + "column": 17 }, { "line": 10, - "column": 15 + "column": 17 } ] } @@ -2542,20 +2443,20 @@ }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/disallows differing return type list despite no overlap", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ... on IntBox {\n box: stringBox {\n scalar\n }\n }\n ... on StringBox {\n box: listStringBox {\n scalar\n }\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ... on IntBox {\n box: stringBox {\n scalar\n }\n }\n ... on StringBox {\n box: listStringBox {\n scalar\n }\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"box\" conflict because they return conflicting types StringBox and [StringBox]. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"box\" conflict because they return conflicting types \"StringBox\" and \"[StringBox]\". Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 5, - "column": 15 + "column": 17 }, { "line": 10, - "column": 15 + "column": 17 } ] } @@ -2563,86 +2464,86 @@ }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/disallows differing deep return types despite no overlap", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ... on IntBox {\n box: stringBox {\n scalar\n }\n }\n ... on StringBox {\n box: intBox {\n scalar\n }\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ... on IntBox {\n box: stringBox {\n scalar\n }\n }\n ... on StringBox {\n box: intBox {\n scalar\n }\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"box\" conflict because subfields \"scalar\" conflict because they return conflicting types String and Int. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"box\" conflict because subfields \"scalar\" conflict because they return conflicting types \"String\" and \"Int\". Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 5, - "column": 15 + "column": 17 }, { "line": 6, - "column": 17 + "column": 19 }, { "line": 10, - "column": 15 + "column": 17 }, { "line": 11, - "column": 17 + "column": 19 } ] } ] }, { - "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/allows non-conflicting overlaping types", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ... on IntBox {\n scalar: unrelatedField\n }\n ... on StringBox {\n scalar\n }\n }\n }\n ", + "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/allows non-conflicting overlapping types", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ... on IntBox {\n scalar: unrelatedField\n }\n ... on StringBox {\n scalar\n }\n }\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/same wrapped scalar return types", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ...on NonNullStringBox1 {\n scalar\n }\n ...on NonNullStringBox2 {\n scalar\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ...on NonNullStringBox1 {\n scalar\n }\n ...on NonNullStringBox2 {\n scalar\n }\n }\n }\n ", "errors": [] }, { - "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/allows inline typeless fragments", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n a\n ... {\n a\n }\n }\n ", + "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/allows inline fragments without type condition", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n a\n ... {\n a\n }\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/compares deep types including list", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n connection {\n ...edgeID\n edges {\n node {\n id: name\n }\n }\n }\n }\n\n fragment edgeID on Connection {\n edges {\n node {\n id\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n connection {\n ...edgeID\n edges {\n node {\n id: name\n }\n }\n }\n }\n\n fragment edgeID on Connection {\n edges {\n node {\n id\n }\n }\n }\n ", "errors": [ { - "message": "Fields \"edges\" conflict because subfields \"node\" conflict because subfields \"id\" conflict because name and id are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"edges\" conflict because subfields \"node\" conflict because subfields \"id\" conflict because \"name\" and \"id\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 5, - "column": 13 + "column": 15 }, { "line": 6, - "column": 15 + "column": 17 }, { "line": 7, - "column": 17 + "column": 19 }, { "line": 14, - "column": 11 + "column": 13 }, { "line": 15, - "column": 13 + "column": 15 }, { "line": 16, - "column": 15 + "column": 17 } ] } @@ -2650,47 +2551,75 @@ }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/ignores unknown types", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 1, - "query": "\n {\n someBox {\n ...on UnknownType {\n scalar\n }\n ...on NonNullStringBox2 {\n scalar\n }\n }\n }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 6, + "query": "\n {\n someBox {\n ...on UnknownType {\n scalar\n }\n ...on NonNullStringBox2 {\n scalar\n }\n }\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/return types must be unambiguous/works for field names that are JS keywords", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 2, - "query": "{\n foo {\n constructor\n }\n }", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 7, + "query": "\n {\n foo {\n constructor\n }\n }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/does not infinite loop on recursive fragment", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment fragA on Human { name, relatives { name, ...fragA } }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n {\n ...fragA\n }\n\n fragment fragA on Human { name, relatives { name, ...fragA } }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/does not infinite loop on immediately recursive fragment", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment fragA on Human { name, ...fragA }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n {\n ...fragA\n }\n\n fragment fragA on Human { name, ...fragA }\n ", "errors": [] }, + { + "name": "Validate: Overlapping fields can be merged/does not infinite loop on recursive fragment with a field named after fragment", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n {\n ...fragA\n fragA\n }\n\n fragment fragA on Query { ...fragA }\n ", + "errors": [] + }, + { + "name": "Validate: Overlapping fields can be merged/finds invalid cases even with field named after fragment", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n {\n fragA\n ...fragA\n }\n\n fragment fragA on Type {\n fragA: b\n }\n ", + "errors": [ + { + "message": "Fields \"fragA\" conflict because \"fragA\" and \"b\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "locations": [ + { + "line": 3, + "column": 9 + }, + { + "line": 8, + "column": 9 + } + ] + } + ] + }, { "name": "Validate: Overlapping fields can be merged/does not infinite loop on transitively recursive fragment", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, - "query": "\n fragment fragA on Human { name, ...fragB }\n fragment fragB on Human { name, ...fragC }\n fragment fragC on Human { name, ...fragA }\n ", + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, + "query": "\n {\n ...fragA\n fragB\n }\n\n fragment fragA on Human { name, ...fragB }\n fragment fragB on Human { name, ...fragC }\n fragment fragC on Human { name, ...fragA }\n ", "errors": [] }, { "name": "Validate: Overlapping fields can be merged/finds invalid case even with immediately recursive fragment", - "rule": "OverlappingFieldsCanBeMerged", - "schema": 0, + "rule": "OverlappingFieldsCanBeMergedRule", + "schema": 1, "query": "\n fragment sameAliasesWithDifferentFieldTargets on Dog {\n ...sameAliasesWithDifferentFieldTargets\n fido: name\n fido: nickname\n }\n ", "errors": [ { - "message": "Fields \"fido\" conflict because name and nickname are different fields. Use different aliases on the fields to fetch both if this was intentional.", + "message": "Fields \"fido\" conflict because \"name\" and \"nickname\" are different fields. Use different aliases on the fields to fetch both if this was intentional.", "locations": [ { "line": 4, @@ -2706,89 +2635,96 @@ }, { "name": "Validate: Provided required arguments/ignores unknown arguments", - "rule": "ProvidedNonNullArguments", - "schema": 0, - "query": "\n {\n dog {\n isHousetrained(unknownArgument: true)\n }\n }\n ", + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, + "query": "\n {\n dog {\n isHouseTrained(unknownArgument: true)\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Valid non-nullable value/Arg on optional arg", - "rule": "ProvidedNonNullArguments", - "schema": 0, - "query": "\n {\n dog {\n isHousetrained(atOtherHomes: true)\n }\n }\n ", + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, + "query": "\n {\n dog {\n isHouseTrained(atOtherHomes: true)\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Valid non-nullable value/No Arg on optional arg", - "rule": "ProvidedNonNullArguments", - "schema": 0, - "query": "\n {\n dog {\n isHousetrained\n }\n }\n ", + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, + "query": "\n {\n dog {\n isHouseTrained\n }\n }\n ", + "errors": [] + }, + { + "name": "Validate: Provided required arguments/Valid non-nullable value/No arg on non-null field with default", + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, + "query": "\n {\n complicatedArgs {\n nonNullFieldWithDefault\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Valid non-nullable value/Multiple args", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleReqs(req1: 1, req2: 2)\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Valid non-nullable value/Multiple args reverse order", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleReqs(req2: 2, req1: 1)\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Valid non-nullable value/No args on multiple optional", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleOpts\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Valid non-nullable value/One arg on multiple optional", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleOpts(opt1: 1)\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Valid non-nullable value/Second arg on multiple optional", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleOpts(opt2: 1)\n }\n }\n ", "errors": [] }, { - "name": "Validate: Provided required arguments/Valid non-nullable value/Multiple reqs on mixedList", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "name": "Validate: Provided required arguments/Valid non-nullable value/Multiple required args on mixedList", + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleOptAndReq(req1: 3, req2: 4)\n }\n }\n ", "errors": [] }, { - "name": "Validate: Provided required arguments/Valid non-nullable value/Multiple reqs and one opt on mixedList", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "name": "Validate: Provided required arguments/Valid non-nullable value/Multiple required and one optional arg on mixedList", + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleOptAndReq(req1: 3, req2: 4, opt1: 5)\n }\n }\n ", "errors": [] }, { - "name": "Validate: Provided required arguments/Valid non-nullable value/All reqs and opts on mixedList", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "name": "Validate: Provided required arguments/Valid non-nullable value/All required and optional args on mixedList", + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleOptAndReq(req1: 3, req2: 4, opt1: 5, opt2: 6)\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Invalid non-nullable value/Missing one non-nullable argument", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleReqs(req2: 2)\n }\n }\n ", "errors": [ { - "message": "Field \"multipleReqs\" argument \"req1\" of type \"Int!\" is required but not provided.", + "message": "Field \"multipleReqs\" argument \"req1\" of type \"Int!\" is required, but it was not provided.", "locations": [ { "line": 4, @@ -2800,12 +2736,12 @@ }, { "name": "Validate: Provided required arguments/Invalid non-nullable value/Missing multiple non-nullable arguments", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleReqs\n }\n }\n ", "errors": [ { - "message": "Field \"multipleReqs\" argument \"req1\" of type \"Int!\" is required but not provided.", + "message": "Field \"multipleReqs\" argument \"req1\" of type \"Int!\" is required, but it was not provided.", "locations": [ { "line": 4, @@ -2814,7 +2750,7 @@ ] }, { - "message": "Field \"multipleReqs\" argument \"req2\" of type \"Int!\" is required but not provided.", + "message": "Field \"multipleReqs\" argument \"req2\" of type \"Int!\" is required, but it was not provided.", "locations": [ { "line": 4, @@ -2826,12 +2762,12 @@ }, { "name": "Validate: Provided required arguments/Invalid non-nullable value/Incorrect value and missing argument", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n complicatedArgs {\n multipleReqs(req1: \"one\")\n }\n }\n ", "errors": [ { - "message": "Field \"multipleReqs\" argument \"req2\" of type \"Int!\" is required but not provided.", + "message": "Field \"multipleReqs\" argument \"req2\" of type \"Int!\" is required, but it was not provided.", "locations": [ { "line": 4, @@ -2843,26 +2779,26 @@ }, { "name": "Validate: Provided required arguments/Directive arguments/ignores unknown directives", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n dog @unknown\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Directive arguments/with directives of valid types", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n dog @include(if: true) {\n name\n }\n human @skip(if: false) {\n name\n }\n }\n ", "errors": [] }, { "name": "Validate: Provided required arguments/Directive arguments/with directive with missing types", - "rule": "ProvidedNonNullArguments", - "schema": 0, + "rule": "ProvidedRequiredArgumentsRule", + "schema": 1, "query": "\n {\n dog @include {\n name @skip\n }\n }\n ", "errors": [ { - "message": "Directive \"@include\" argument \"if\" of type \"Boolean!\" is required but not provided.", + "message": "Directive \"@include\" argument \"if\" of type \"Boolean!\" is required, but it was not provided.", "locations": [ { "line": 3, @@ -2871,7 +2807,7 @@ ] }, { - "message": "Directive \"@skip\" argument \"if\" of type \"Boolean!\" is required but not provided.", + "message": "Directive \"@skip\" argument \"if\" of type \"Boolean!\" is required, but it was not provided.", "locations": [ { "line": 4, @@ -2883,15 +2819,15 @@ }, { "name": "Validate: Scalar leafs/valid scalar selection", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n fragment scalarSelection on Dog {\n barks\n }\n ", "errors": [] }, { "name": "Validate: Scalar leafs/object type missing selection", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n query directQueryOnObjectWithoutSubFields {\n human\n }\n ", "errors": [ { @@ -2907,8 +2843,8 @@ }, { "name": "Validate: Scalar leafs/interface type missing selection", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n {\n human { pets }\n }\n ", "errors": [ { @@ -2924,15 +2860,15 @@ }, { "name": "Validate: Scalar leafs/valid scalar selection with args", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n fragment scalarSelectionWithArgs on Dog {\n doesKnowCommand(dogCommand: SIT)\n }\n ", "errors": [] }, { "name": "Validate: Scalar leafs/scalar selection not allowed on Boolean", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n fragment scalarSelectionsNotAllowedOnBoolean on Dog {\n barks { sinceWhen }\n }\n ", "errors": [ { @@ -2948,9 +2884,9 @@ }, { "name": "Validate: Scalar leafs/scalar selection not allowed on Enum", - "rule": "ScalarLeafs", - "schema": 0, - "query": "\n fragment scalarSelectionsNotAllowedOnEnum on Cat {\n furColor { inHexdec }\n }\n ", + "rule": "ScalarLeafsRule", + "schema": 1, + "query": "\n fragment scalarSelectionsNotAllowedOnEnum on Cat {\n furColor { inHexDec }\n }\n ", "errors": [ { "message": "Field \"furColor\" must not have a selection since type \"FurColor\" has no subfields.", @@ -2965,8 +2901,8 @@ }, { "name": "Validate: Scalar leafs/scalar selection not allowed with args", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n fragment scalarSelectionsNotAllowedWithArgs on Dog {\n doesKnowCommand(dogCommand: SIT) { sinceWhen }\n }\n ", "errors": [ { @@ -2982,8 +2918,8 @@ }, { "name": "Validate: Scalar leafs/Scalar selection not allowed with directives", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n fragment scalarSelectionsNotAllowedWithDirectives on Dog {\n name @include(if: true) { isAlsoHumanName }\n }\n ", "errors": [ { @@ -2999,8 +2935,8 @@ }, { "name": "Validate: Scalar leafs/Scalar selection not allowed with directives and args", - "rule": "ScalarLeafs", - "schema": 0, + "rule": "ScalarLeafsRule", + "schema": 1, "query": "\n fragment scalarSelectionsNotAllowedWithDirectivesAndArgs on Dog {\n doesKnowCommand(dogCommand: SIT) @include(if: true) { sinceWhen }\n }\n ", "errors": [ { @@ -3016,71 +2952,71 @@ }, { "name": "Validate: Unique argument names/no arguments on field", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/no arguments on directive", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field @directive\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/argument on field", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field(arg: \"value\")\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/argument on directive", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field @directive(arg: \"value\")\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/same argument on two fields", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n one: field(arg: \"value\")\n two: field(arg: \"value\")\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/same argument on field and directive", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field(arg: \"value\") @directive(arg: \"value\")\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/same argument on two directives", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field @directive1(arg: \"value\") @directive2(arg: \"value\")\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/multiple field arguments", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field(arg1: \"value\", arg2: \"value\", arg3: \"value\")\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/multiple directive arguments", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field @directive(arg1: \"value\", arg2: \"value\", arg3: \"value\")\n }\n ", "errors": [] }, { "name": "Validate: Unique argument names/duplicate field arguments", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field(arg1: \"value\", arg1: \"value\")\n }\n ", "errors": [ { @@ -3100,8 +3036,8 @@ }, { "name": "Validate: Unique argument names/many duplicate field arguments", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field(arg1: \"value\", arg1: \"value\", arg1: \"value\")\n }\n ", "errors": [ { @@ -3114,15 +3050,6 @@ { "line": 3, "column": 30 - } - ] - }, - { - "message": "There can be only one argument named \"arg1\".", - "locations": [ - { - "line": 3, - "column": 15 }, { "line": 3, @@ -3134,8 +3061,8 @@ }, { "name": "Validate: Unique argument names/duplicate directive arguments", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field @directive(arg1: \"value\", arg1: \"value\")\n }\n ", "errors": [ { @@ -3155,8 +3082,8 @@ }, { "name": "Validate: Unique argument names/many duplicate directive arguments", - "rule": "UniqueArgumentNames", - "schema": 0, + "rule": "UniqueArgumentNamesRule", + "schema": 1, "query": "\n {\n field @directive(arg1: \"value\", arg1: \"value\", arg1: \"value\")\n }\n ", "errors": [ { @@ -3169,15 +3096,6 @@ { "line": 3, "column": 41 - } - ] - }, - { - "message": "There can be only one argument named \"arg1\".", - "locations": [ - { - "line": 3, - "column": 26 }, { "line": 3, @@ -3189,47 +3107,61 @@ }, { "name": "Validate: Directives Are Unique Per Location/no directives", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type {\n field\n }\n ", "errors": [] }, { "name": "Validate: Directives Are Unique Per Location/unique directives in different locations", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type @directiveA {\n field @directiveB\n }\n ", "errors": [] }, { "name": "Validate: Directives Are Unique Per Location/unique directives in same locations", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type @directiveA @directiveB {\n field @directiveA @directiveB\n }\n ", "errors": [] }, { "name": "Validate: Directives Are Unique Per Location/same directives in different locations", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type @directiveA {\n field @directiveA\n }\n ", "errors": [] }, { "name": "Validate: Directives Are Unique Per Location/same directives in similar locations", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type {\n field @directive\n field @directive\n }\n ", "errors": [] }, + { + "name": "Validate: Directives Are Unique Per Location/repeatable directives in same location", + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, + "query": "\n fragment Test on Type @repeatable @repeatable {\n field @repeatable @repeatable\n }\n ", + "errors": [] + }, + { + "name": "Validate: Directives Are Unique Per Location/unknown directives must be ignored", + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, + "query": "\n type Test @unknown @unknown {\n field: String! @unknown @unknown\n }\n\n extend type Test @unknown {\n anotherField: String!\n }\n ", + "errors": [] + }, { "name": "Validate: Directives Are Unique Per Location/duplicate directives in one location", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type {\n field @directive @directive\n }\n ", "errors": [ { - "message": "The directive \"directive\" can only be used once at this location.", + "message": "The directive \"@directive\" can only be used once at this location.", "locations": [ { "line": 3, @@ -3245,12 +3177,12 @@ }, { "name": "Validate: Directives Are Unique Per Location/many duplicate directives in one location", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type {\n field @directive @directive @directive\n }\n ", "errors": [ { - "message": "The directive \"directive\" can only be used once at this location.", + "message": "The directive \"@directive\" can only be used once at this location.", "locations": [ { "line": 3, @@ -3263,7 +3195,7 @@ ] }, { - "message": "The directive \"directive\" can only be used once at this location.", + "message": "The directive \"@directive\" can only be used once at this location.", "locations": [ { "line": 3, @@ -3279,12 +3211,12 @@ }, { "name": "Validate: Directives Are Unique Per Location/different duplicate directives in one location", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type {\n field @directiveA @directiveB @directiveA @directiveB\n }\n ", "errors": [ { - "message": "The directive \"directiveA\" can only be used once at this location.", + "message": "The directive \"@directiveA\" can only be used once at this location.", "locations": [ { "line": 3, @@ -3297,7 +3229,7 @@ ] }, { - "message": "The directive \"directiveB\" can only be used once at this location.", + "message": "The directive \"@directiveB\" can only be used once at this location.", "locations": [ { "line": 3, @@ -3313,12 +3245,12 @@ }, { "name": "Validate: Directives Are Unique Per Location/duplicate directives in many locations", - "rule": "UniqueDirectivesPerLocation", - "schema": 0, + "rule": "UniqueDirectivesPerLocationRule", + "schema": 8, "query": "\n fragment Test on Type @directive @directive {\n field @directive @directive\n }\n ", "errors": [ { - "message": "The directive \"directive\" can only be used once at this location.", + "message": "The directive \"@directive\" can only be used once at this location.", "locations": [ { "line": 2, @@ -3331,7 +3263,7 @@ ] }, { - "message": "The directive \"directive\" can only be used once at this location.", + "message": "The directive \"@directive\" can only be used once at this location.", "locations": [ { "line": 3, @@ -3347,43 +3279,43 @@ }, { "name": "Validate: Unique fragment names/no fragments", - "rule": "UniqueFragmentNames", - "schema": 0, + "rule": "UniqueFragmentNamesRule", + "schema": 1, "query": "\n {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique fragment names/one fragment", - "rule": "UniqueFragmentNames", - "schema": 0, + "rule": "UniqueFragmentNamesRule", + "schema": 1, "query": "\n {\n ...fragA\n }\n\n fragment fragA on Type {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique fragment names/many fragments", - "rule": "UniqueFragmentNames", - "schema": 0, + "rule": "UniqueFragmentNamesRule", + "schema": 1, "query": "\n {\n ...fragA\n ...fragB\n ...fragC\n }\n fragment fragA on Type {\n fieldA\n }\n fragment fragB on Type {\n fieldB\n }\n fragment fragC on Type {\n fieldC\n }\n ", "errors": [] }, { "name": "Validate: Unique fragment names/inline fragments are always unique", - "rule": "UniqueFragmentNames", - "schema": 0, + "rule": "UniqueFragmentNamesRule", + "schema": 1, "query": "\n {\n ...on Type {\n fieldA\n }\n ...on Type {\n fieldB\n }\n }\n ", "errors": [] }, { "name": "Validate: Unique fragment names/fragment and operation named the same", - "rule": "UniqueFragmentNames", - "schema": 0, + "rule": "UniqueFragmentNamesRule", + "schema": 1, "query": "\n query Foo {\n ...Foo\n }\n fragment Foo on Type {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique fragment names/fragments named the same", - "rule": "UniqueFragmentNames", - "schema": 0, + "rule": "UniqueFragmentNamesRule", + "schema": 1, "query": "\n {\n ...fragA\n }\n fragment fragA on Type {\n fieldA\n }\n fragment fragA on Type {\n fieldB\n }\n ", "errors": [ { @@ -3403,8 +3335,8 @@ }, { "name": "Validate: Unique fragment names/fragments named the same without being referenced", - "rule": "UniqueFragmentNames", - "schema": 0, + "rule": "UniqueFragmentNamesRule", + "schema": 1, "query": "\n fragment fragA on Type {\n fieldA\n }\n fragment fragA on Type {\n fieldB\n }\n ", "errors": [ { @@ -3424,36 +3356,36 @@ }, { "name": "Validate: Unique input field names/input object with fields", - "rule": "UniqueInputFieldNames", - "schema": 0, + "rule": "UniqueInputFieldNamesRule", + "schema": 1, "query": "\n {\n field(arg: { f: true })\n }\n ", "errors": [] }, { "name": "Validate: Unique input field names/same input object within two args", - "rule": "UniqueInputFieldNames", - "schema": 0, + "rule": "UniqueInputFieldNamesRule", + "schema": 1, "query": "\n {\n field(arg1: { f: true }, arg2: { f: true })\n }\n ", "errors": [] }, { "name": "Validate: Unique input field names/multiple input object fields", - "rule": "UniqueInputFieldNames", - "schema": 0, + "rule": "UniqueInputFieldNamesRule", + "schema": 1, "query": "\n {\n field(arg: { f1: \"value\", f2: \"value\", f3: \"value\" })\n }\n ", "errors": [] }, { "name": "Validate: Unique input field names/allows for nested input objects with similar fields", - "rule": "UniqueInputFieldNames", - "schema": 0, + "rule": "UniqueInputFieldNamesRule", + "schema": 1, "query": "\n {\n field(arg: {\n deep: {\n deep: {\n id: 1\n }\n id: 1\n }\n id: 1\n })\n }\n ", "errors": [] }, { "name": "Validate: Unique input field names/duplicate input object fields", - "rule": "UniqueInputFieldNames", - "schema": 0, + "rule": "UniqueInputFieldNamesRule", + "schema": 1, "query": "\n {\n field(arg: { f1: \"value\", f1: \"value\" })\n }\n ", "errors": [ { @@ -3473,8 +3405,8 @@ }, { "name": "Validate: Unique input field names/many duplicate input object fields", - "rule": "UniqueInputFieldNames", - "schema": 0, + "rule": "UniqueInputFieldNamesRule", + "schema": 1, "query": "\n {\n field(arg: { f1: \"value\", f1: \"value\", f1: \"value\" })\n }\n ", "errors": [ { @@ -3505,52 +3437,73 @@ } ] }, + { + "name": "Validate: Unique input field names/nested duplicate input object fields", + "rule": "UniqueInputFieldNamesRule", + "schema": 1, + "query": "\n {\n field(arg: { f1: {f2: \"value\", f2: \"value\" }})\n }\n ", + "errors": [ + { + "message": "There can be only one input field named \"f2\".", + "locations": [ + { + "line": 3, + "column": 27 + }, + { + "line": 3, + "column": 40 + } + ] + } + ] + }, { "name": "Validate: Unique operation names/no operations", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n fragment fragA on Type {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique operation names/one anon operation", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique operation names/one named operation", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n query Foo {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique operation names/multiple operations", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n query Foo {\n field\n }\n\n query Bar {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique operation names/multiple operations of different types", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n query Foo {\n field\n }\n\n mutation Bar {\n field\n }\n\n subscription Baz {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique operation names/fragment and operation named the same", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n query Foo {\n ...Foo\n }\n fragment Foo on Type {\n field\n }\n ", "errors": [] }, { "name": "Validate: Unique operation names/multiple operations of same name", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n query Foo {\n fieldA\n }\n query Foo {\n fieldB\n }\n ", "errors": [ { @@ -3570,8 +3523,8 @@ }, { "name": "Validate: Unique operation names/multiple ops of same name of different types (mutation)", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n query Foo {\n fieldA\n }\n mutation Foo {\n fieldB\n }\n ", "errors": [ { @@ -3591,8 +3544,8 @@ }, { "name": "Validate: Unique operation names/multiple ops of same name of different types (subscription)", - "rule": "UniqueOperationNames", - "schema": 0, + "rule": "UniqueOperationNamesRule", + "schema": 1, "query": "\n query Foo {\n fieldA\n }\n subscription Foo {\n fieldB\n }\n ", "errors": [ { @@ -3612,19 +3565,19 @@ }, { "name": "Validate: Unique variable names/unique variable names", - "rule": "UniqueVariableNames", - "schema": 0, + "rule": "UniqueVariableNamesRule", + "schema": 1, "query": "\n query A($x: Int, $y: String) { __typename }\n query B($x: String, $y: Int) { __typename }\n ", "errors": [] }, { "name": "Validate: Unique variable names/duplicate variable names", - "rule": "UniqueVariableNames", - "schema": 0, + "rule": "UniqueVariableNamesRule", + "schema": 1, "query": "\n query A($x: Int, $x: Int, $x: String) { __typename }\n query B($x: String, $x: Int) { __typename }\n query C($x: Int, $x: Int) { __typename }\n ", "errors": [ { - "message": "There can be only one variable named \"x\".", + "message": "There can be only one variable named \"$x\".", "locations": [ { "line": 2, @@ -3633,15 +3586,6 @@ { "line": 2, "column": 25 - } - ] - }, - { - "message": "There can be only one variable named \"x\".", - "locations": [ - { - "line": 2, - "column": 16 }, { "line": 2, @@ -3650,7 +3594,7 @@ ] }, { - "message": "There can be only one variable named \"x\".", + "message": "There can be only one variable named \"$x\".", "locations": [ { "line": 3, @@ -3663,7 +3607,7 @@ ] }, { - "message": "There can be only one variable named \"x\".", + "message": "There can be only one variable named \"$x\".", "locations": [ { "line": 4, @@ -3677,17 +3621,24 @@ } ] }, + { + "name": "Validate: Variables are input types/unknown types are ignored", + "rule": "VariablesAreInputTypesRule", + "schema": 1, + "query": "\n query Foo($a: Unknown, $b: [[Unknown!]]!) {\n field(a: $a, b: $b)\n }\n ", + "errors": [] + }, { "name": "Validate: Variables are input types/input types are valid", - "rule": "VariablesAreInputTypes", - "schema": 0, + "rule": "VariablesAreInputTypesRule", + "schema": 1, "query": "\n query Foo($a: String, $b: [Boolean!]!, $c: ComplexInput) {\n field(a: $a, b: $b, c: $c)\n }\n ", "errors": [] }, { "name": "Validate: Variables are input types/output types are invalid", - "rule": "VariablesAreInputTypes", - "schema": 0, + "rule": "VariablesAreInputTypesRule", + "schema": 1, "query": "\n query Foo($a: Dog, $b: [[CatOrDog!]]!, $c: Pet) {\n field(a: $a, b: $b, c: $c)\n }\n ", "errors": [ { @@ -3721,106 +3672,92 @@ }, { "name": "Validate: Variables are in allowed positions/Boolean => Boolean", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($booleanArg: Boolean)\n {\n complicatedArgs {\n booleanArgField(booleanArg: $booleanArg)\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/Boolean => Boolean within fragment", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n fragment booleanArgFrag on ComplicatedArgs {\n booleanArgField(booleanArg: $booleanArg)\n }\n query Query($booleanArg: Boolean)\n {\n complicatedArgs {\n ...booleanArgFrag\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/Boolean => Boolean within fragment", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($booleanArg: Boolean)\n {\n complicatedArgs {\n ...booleanArgFrag\n }\n }\n fragment booleanArgFrag on ComplicatedArgs {\n booleanArgField(booleanArg: $booleanArg)\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/Boolean! => Boolean", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($nonNullBooleanArg: Boolean!)\n {\n complicatedArgs {\n booleanArgField(booleanArg: $nonNullBooleanArg)\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/Boolean! => Boolean within fragment", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n fragment booleanArgFrag on ComplicatedArgs {\n booleanArgField(booleanArg: $nonNullBooleanArg)\n }\n\n query Query($nonNullBooleanArg: Boolean!)\n {\n complicatedArgs {\n ...booleanArgFrag\n }\n }\n ", "errors": [] }, - { - "name": "Validate: Variables are in allowed positions/Int => Int! with default", - "rule": "VariablesInAllowedPosition", - "schema": 0, - "query": "\n query Query($intArg: Int = 1)\n {\n complicatedArgs {\n nonNullIntArgField(nonNullIntArg: $intArg)\n }\n }\n ", - "errors": [] - }, { "name": "Validate: Variables are in allowed positions/[String] => [String]", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringListVar: [String])\n {\n complicatedArgs {\n stringListArgField(stringListArg: $stringListVar)\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/[String!] => [String]", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringListVar: [String!])\n {\n complicatedArgs {\n stringListArgField(stringListArg: $stringListVar)\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/String => [String] in item position", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringVar: String)\n {\n complicatedArgs {\n stringListArgField(stringListArg: [$stringVar])\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/String! => [String] in item position", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringVar: String!)\n {\n complicatedArgs {\n stringListArgField(stringListArg: [$stringVar])\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/ComplexInput => ComplexInput", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($complexVar: ComplexInput)\n {\n complicatedArgs {\n complexArgField(complexArg: $complexVar)\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/ComplexInput => ComplexInput in field position", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($boolVar: Boolean = false)\n {\n complicatedArgs {\n complexArgField(complexArg: {requiredArg: $boolVar})\n }\n }\n ", "errors": [] }, { "name": "Validate: Variables are in allowed positions/Boolean! => Boolean! in directive", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($boolVar: Boolean!)\n {\n dog @include(if: $boolVar)\n }\n ", "errors": [] }, - { - "name": "Validate: Variables are in allowed positions/Boolean => Boolean! in directive with default", - "rule": "VariablesInAllowedPosition", - "schema": 0, - "query": "\n query Query($boolVar: Boolean = false)\n {\n dog @include(if: $boolVar)\n }\n ", - "errors": [] - }, { "name": "Validate: Variables are in allowed positions/Int => Int!", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($intArg: Int) {\n complicatedArgs {\n nonNullIntArgField(nonNullIntArg: $intArg)\n }\n }\n ", "errors": [ { @@ -3840,8 +3777,8 @@ }, { "name": "Validate: Variables are in allowed positions/Int => Int! within fragment", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n fragment nonNullIntArgFieldFrag on ComplicatedArgs {\n nonNullIntArgField(nonNullIntArg: $intArg)\n }\n\n query Query($intArg: Int) {\n complicatedArgs {\n ...nonNullIntArgFieldFrag\n }\n }\n ", "errors": [ { @@ -3861,8 +3798,8 @@ }, { "name": "Validate: Variables are in allowed positions/Int => Int! within nested fragment", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n fragment outerFrag on ComplicatedArgs {\n ...nonNullIntArgFieldFrag\n }\n\n fragment nonNullIntArgFieldFrag on ComplicatedArgs {\n nonNullIntArgField(nonNullIntArg: $intArg)\n }\n\n query Query($intArg: Int) {\n complicatedArgs {\n ...outerFrag\n }\n }\n ", "errors": [ { @@ -3882,8 +3819,8 @@ }, { "name": "Validate: Variables are in allowed positions/String over Boolean", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringVar: String) {\n complicatedArgs {\n booleanArgField(booleanArg: $stringVar)\n }\n }\n ", "errors": [ { @@ -3903,8 +3840,8 @@ }, { "name": "Validate: Variables are in allowed positions/String => [String]", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringVar: String) {\n complicatedArgs {\n stringListArgField(stringListArg: $stringVar)\n }\n }\n ", "errors": [ { @@ -3924,8 +3861,8 @@ }, { "name": "Validate: Variables are in allowed positions/Boolean => Boolean! in directive", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($boolVar: Boolean) {\n dog @include(if: $boolVar)\n }\n ", "errors": [ { @@ -3945,8 +3882,8 @@ }, { "name": "Validate: Variables are in allowed positions/String => Boolean! in directive", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringVar: String) {\n dog @include(if: $stringVar)\n }\n ", "errors": [ { @@ -3966,8 +3903,8 @@ }, { "name": "Validate: Variables are in allowed positions/[String] => [String!]", - "rule": "VariablesInAllowedPosition", - "schema": 0, + "rule": "VariablesInAllowedPositionRule", + "schema": 1, "query": "\n query Query($stringListVar: [String])\n {\n complicatedArgs {\n stringListNonNullArgField(stringListNonNullArg: $stringListVar)\n }\n }\n ", "errors": [ { @@ -3984,6 +3921,48 @@ ] } ] + }, + { + "name": "Validate: Variables are in allowed positions/Allows optional (nullable) variables with default values/Int => Int! fails when variable provides null default value", + "rule": "VariablesInAllowedPositionRule", + "schema": 1, + "query": "\n query Query($intVar: Int = null) {\n complicatedArgs {\n nonNullIntArgField(nonNullIntArg: $intVar)\n }\n }\n ", + "errors": [ + { + "message": "Variable \"$intVar\" of type \"Int\" used in position expecting type \"Int!\".", + "locations": [ + { + "line": 2, + "column": 21 + }, + { + "line": 4, + "column": 47 + } + ] + } + ] + }, + { + "name": "Validate: Variables are in allowed positions/Allows optional (nullable) variables with default values/Int => Int! when variable provides non-null default value", + "rule": "VariablesInAllowedPositionRule", + "schema": 1, + "query": "\n query Query($intVar: Int = 1) {\n complicatedArgs {\n nonNullIntArgField(nonNullIntArg: $intVar)\n }\n }", + "errors": [] + }, + { + "name": "Validate: Variables are in allowed positions/Allows optional (nullable) variables with default values/Int => Int! when optional argument provides default value", + "rule": "VariablesInAllowedPositionRule", + "schema": 1, + "query": "\n query Query($intVar: Int) {\n complicatedArgs {\n nonNullFieldWithDefault(nonNullIntArg: $intVar)\n }\n }", + "errors": [] + }, + { + "name": "Validate: Variables are in allowed positions/Allows optional (nullable) variables with default values/Boolean => Boolean! in directive with default value with option", + "rule": "VariablesInAllowedPositionRule", + "schema": 1, + "query": "\n query Query($boolVar: Boolean = false) {\n dog @include(if: $boolVar)\n }", + "errors": [] } ] -} +} \ No newline at end of file diff --git a/internal/validation/testdata/tsconfig.json b/internal/validation/testdata/tsconfig.json new file mode 100644 index 000000000..6bed80282 --- /dev/null +++ b/internal/validation/testdata/tsconfig.json @@ -0,0 +1,41 @@ +{ + "include": [ + "run.ts", + "node_modules/graphql/**/*.ts" + ], + "compilerOptions": { + "lib": [ + "es2022", + "dom" // Workaround for missing web-compatible globals in `@types/node` + ], + "target": "es2021", + "module": "es2022", + "moduleResolution": "node", + "noEmit": true, + "isolatedModules": true, + "verbatimModuleSyntax": true, + "forceConsistentCasingInFileNames": true, + + // Type Checking + // https://www.typescriptlang.org/tsconfig#Type_Checking_6248 + "strict": true, + "useUnknownInCatchVariables": false, // FIXME part of 'strict' but is temporary disabled + // All checks that are not part of "strict" + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "exactOptionalPropertyTypes": true, + "noFallthroughCasesInSwitch": false, // TODO consider + "noImplicitOverride": true, + "noImplicitReturns": false, // TODO consider + "noPropertyAccessFromIndexSignature": false, // TODO consider + "noUncheckedIndexedAccess": false, // FIXME + "noUnusedLocals": true, + "noUnusedParameters": true, + "allowSyntheticDefaultImports": true + }, + "ts-node": { + "esm": true, + // Dependencies would normally be skipped, however we've got to checkout graphql-js as a source package + "skipIgnore": true + } +} diff --git a/internal/validation/validation.go b/internal/validation/validation.go index 4cdf274e5..42fe6e536 100644 --- a/internal/validation/validation.go +++ b/internal/validation/validation.go @@ -18,7 +18,7 @@ type varSet map[*ast.InputValueDefinition]struct{} type selectionPair struct{ a, b ast.Selection } -type nameSet map[string]errors.Location +type nameSet map[string][]errors.Location type fieldInfo struct { sf *ast.FieldDefinition @@ -68,7 +68,7 @@ func newContext(s *ast.Schema, doc *ast.ExecutableDefinition, maxDepth int) *con func Validate(s *ast.Schema, doc *ast.ExecutableDefinition, variables map[string]interface{}, maxDepth int) []*errors.QueryError { c := newContext(s, doc, maxDepth) - opNames := make(nameSet) + opNames := make(nameSet, len(doc.Operations)) fragUsedBy := make(map[*ast.FragmentDefinition][]*ast.OperationDefinition) for _, op := range doc.Operations { c.usedVars[op] = make(varSet) @@ -81,21 +81,22 @@ func Validate(s *ast.Schema, doc *ast.ExecutableDefinition, variables map[string } if op.Name.Name == "" && len(doc.Operations) != 1 { - c.addErr(op.Loc, "LoneAnonymousOperation", "This anonymous operation must be the only defined operation.") - } - if op.Name.Name != "" { - validateName(c, opNames, op.Name, "UniqueOperationNames", "operation") + c.addErr(op.Loc, "LoneAnonymousOperationRule", "This anonymous operation must be the only defined operation.") } - validateDirectives(opc, string(op.Type), op.Directives) + if n := op.Name.Name; n != "" { + opNames[n] = append(opNames[n], op.Name.Loc) + } - varNames := make(nameSet) + varNames := make(nameSet, len(op.Vars)) for _, v := range op.Vars { - validateName(c, varNames, v.Name, "UniqueVariableNames", "variable") + varNames[v.Name.Name] = append(varNames[v.Name.Name], v.Name.Loc) + + validateDirectives(opc, "VARIABLE_DEFINITION", v.Directives) t := resolveType(c, v.Type) if !canBeInput(t) { - c.addErr(v.TypeLoc, "VariablesAreInputTypes", "Variable %q cannot be non-input type %q.", "$"+v.Name.Name, t) + c.addErr(v.TypeLoc, "VariablesAreInputTypesRule", "Variable %q cannot be non-input type %q.", "$"+v.Name.Name, t) } validateValue(opc, v, variables[v.Name.Name], t) @@ -114,6 +115,12 @@ func Validate(s *ast.Schema, doc *ast.ExecutableDefinition, variables map[string } } + validateDirectives(opc, string(op.Type), op.Directives) + + for n, locs := range varNames { + validateName(c, locs, n, "UniqueVariableNamesRule", "variable") + } + var entryPoint ast.NamedType switch op.Type { case query.Query: @@ -135,18 +142,23 @@ func Validate(s *ast.Schema, doc *ast.ExecutableDefinition, variables map[string } } - fragNames := make(nameSet) + for n, locs := range opNames { + validateName(c, locs, n, "UniqueOperationNamesRule", "operation") + } + + fragNames := make(nameSet, len(doc.Fragments)) fragVisited := make(map[*ast.FragmentDefinition]struct{}) for _, frag := range doc.Fragments { opc := &opContext{c, fragUsedBy[frag]} - validateName(c, fragNames, frag.Name, "UniqueFragmentNames", "fragment") + fragNames[frag.Name.Name] = append(fragNames[frag.Name.Name], frag.Name.Loc) + validateDirectives(opc, "FRAGMENT_DEFINITION", frag.Directives) t := unwrapType(resolveType(c, &frag.On)) // continue even if t is nil if t != nil && !canBeFragment(t) { - c.addErr(frag.On.Loc, "FragmentsOnCompositeTypes", "Fragment %q cannot condition on non composite type %q.", frag.Name.Name, t) + c.addErr(frag.On.Loc, "FragmentsOnCompositeTypesRule", "Fragment %q cannot condition on non composite type %q.", frag.Name.Name, t) continue } @@ -157,9 +169,13 @@ func Validate(s *ast.Schema, doc *ast.ExecutableDefinition, variables map[string } } + for n, locs := range fragNames { + validateName(c, locs, n, "UniqueFragmentNamesRule", "fragment") + } + for _, frag := range doc.Fragments { if len(fragUsedBy[frag]) == 0 { - c.addErr(frag.Loc, "NoUnusedFragments", "Fragment %q is never used.", frag.Name.Name) + c.addErr(frag.Loc, "NoUnusedFragmentsRule", "Fragment %q is never used.", frag.Name.Name) } } @@ -173,7 +189,7 @@ func Validate(s *ast.Schema, doc *ast.ExecutableDefinition, variables map[string if op.Name.Name != "" { opSuffix = fmt.Sprintf(" in operation %q", op.Name.Name) } - c.addErr(v.Loc, "NoUnusedVariables", "Variable %q is never used%s.", "$"+v.Name.Name, opSuffix) + c.addErr(v.Loc, "NoUnusedVariablesRule", "Variable %q is never used%s.", "$"+v.Name.Name, opSuffix) } } } @@ -331,7 +347,7 @@ func validateSelection(c *opContext, sel ast.Selection, t ast.NamedType) { f = fields(t).Get(fieldName) if f == nil && t != nil { suggestion := makeSuggestion("Did you mean", fields(t).Names(), fieldName) - c.addErr(sel.Alias.Loc, "FieldsOnCorrectType", "Cannot query field %q on type %q.%s", fieldName, t, suggestion) + c.addErr(sel.Alias.Loc, "FieldsOnCorrectTypeRule", "Cannot query field %q on type %q.%s", fieldName, t, suggestion) } } c.fieldMap[sel] = fieldInfo{sf: f, parent: t} @@ -349,10 +365,10 @@ func validateSelection(c *opContext, sel ast.Selection, t ast.NamedType) { ft = f.Type sf := hasSubfields(ft) if sf && sel.SelectionSet == nil { - c.addErr(sel.Alias.Loc, "ScalarLeafs", "Field %q of type %q must have a selection of subfields. Did you mean \"%s { ... }\"?", fieldName, ft, fieldName) + c.addErr(sel.Alias.Loc, "ScalarLeafsRule", "Field %q of type %q must have a selection of subfields. Did you mean \"%s { ... }\"?", fieldName, ft, fieldName) } if !sf && sel.SelectionSet != nil { - c.addErr(sel.SelectionSetLoc, "ScalarLeafs", "Field %q must not have a selection since type %q has no subfields.", fieldName, ft) + c.addErr(sel.SelectionSetLoc, "ScalarLeafsRule", "Field %q must not have a selection since type %q has no subfields.", fieldName, ft) } } if sel.SelectionSet != nil { @@ -370,7 +386,7 @@ func validateSelection(c *opContext, sel ast.Selection, t ast.NamedType) { // continue even if t is nil } if t != nil && !canBeFragment(t) { - c.addErr(sel.On.Loc, "FragmentsOnCompositeTypes", "Fragment cannot condition on non composite type %q.", t) + c.addErr(sel.On.Loc, "FragmentsOnCompositeTypesRule", "Fragment cannot condition on non composite type %q.", t) return } validateSelectionSet(c, sel.Selections, unwrapType(t)) @@ -379,7 +395,7 @@ func validateSelection(c *opContext, sel ast.Selection, t ast.NamedType) { validateDirectives(c, "FRAGMENT_SPREAD", sel.Directives) frag := c.doc.Fragments.Get(sel.Name.Name) if frag == nil { - c.addErr(sel.Name.Loc, "KnownFragmentNames", "Unknown fragment %q.", sel.Name.Name) + c.addErr(sel.Name.Loc, "KnownFragmentNamesRule", "Unknown fragment %q.", sel.Name.Name) return } fragTyp := c.schema.Types[frag.On.Name] @@ -475,7 +491,7 @@ func detectFragmentCycleSel(c *context, sel ast.Selection, fragVisited map[*ast. if len(cyclePath) > 1 { names := make([]string, len(cyclePath)-1) for i, frag := range cyclePath[:len(cyclePath)-1] { - names[i] = frag.Name.Name + names[i] = fmt.Sprintf("%q", frag.Name.Name) } via = " via " + strings.Join(names, ", ") } @@ -484,7 +500,7 @@ func detectFragmentCycleSel(c *context, sel ast.Selection, fragVisited map[*ast. for i, frag := range cyclePath { locs[i] = frag.Loc } - c.addErrMultiLoc(locs, "NoFragmentCycles", "Cannot spread fragment %q within itself%s.", frag.Name.Name, via) + c.addErrMultiLoc(locs, "NoFragmentCyclesRule", "Cannot spread fragment %q within itself%s.", frag.Name.Name, via) return } @@ -523,7 +539,7 @@ func (c *context) validateOverlap(a, b ast.Selection, reasons *[]string, locs *[ if reasons2, locs2 := c.validateFieldOverlap(a, b); len(reasons2) != 0 { locs2 = append(locs2, a.Alias.Loc, b.Alias.Loc) if reasons == nil { - c.addErrMultiLoc(locs2, "OverlappingFieldsCanBeMerged", "Fields %q conflict because %s. Use different aliases on the fields to fetch both if this was intentional.", a.Alias.Name, strings.Join(reasons2, " and ")) + c.addErrMultiLoc(locs2, "OverlappingFieldsCanBeMergedRule", "Fields %q conflict because %s. Use different aliases on the fields to fetch both if this was intentional.", a.Alias.Name, strings.Join(reasons2, " and ")) return } for _, r := range reasons2 { @@ -573,7 +589,7 @@ func (c *context) validateFieldOverlap(a, b *ast.Field) ([]string, []errors.Loca if asf := c.fieldMap[a].sf; asf != nil { if bsf := c.fieldMap[b].sf; bsf != nil { if !typesCompatible(asf.Type, bsf.Type) { - return []string{fmt.Sprintf("they return conflicting types %s and %s", asf.Type, bsf.Type)}, nil + return []string{fmt.Sprintf("they return conflicting types %q and %q", asf.Type, bsf.Type)}, nil } } } @@ -582,7 +598,7 @@ func (c *context) validateFieldOverlap(a, b *ast.Field) ([]string, []errors.Loca bt := c.fieldMap[b].parent if at == nil || bt == nil || at == bt { if a.Name.Name != b.Name.Name { - return []string{fmt.Sprintf("%s and %s are different fields", a.Name.Name, b.Name.Name)}, nil + return []string{fmt.Sprintf("%q and %q are different fields", a.Name.Name, b.Name.Name)}, nil } if argumentsConflict(a.Arguments, b.Arguments) { @@ -651,18 +667,17 @@ func resolveType(c *context, t ast.Type) ast.Type { } func validateDirectives(c *opContext, loc string, directives ast.DirectiveList) { - directiveNames := make(nameSet) + directiveNames := make(nameSet, len(directives)) for _, d := range directives { dirName := d.Name.Name - validateNameCustomMsg(c.context, directiveNames, d.Name, "UniqueDirectivesPerLocation", func() string { - return fmt.Sprintf("The directive %q can only be used once at this location.", dirName) - }) + + directiveNames[dirName] = append(directiveNames[dirName], d.Name.Loc) validateArgumentLiterals(c, d.Arguments) dd, ok := c.schema.Directives[dirName] if !ok { - c.addErr(d.Name.Loc, "KnownDirectives", "Unknown directive %q.", dirName) + c.addErr(d.Name.Loc, "KnownDirectivesRule", "Unknown directive %q.", "@"+dirName) continue } @@ -674,7 +689,7 @@ func validateDirectives(c *opContext, loc string, directives ast.DirectiveList) } } if !locOK { - c.addErr(d.Name.Loc, "KnownDirectives", "Directive %q may not be used on %s.", dirName, loc) + c.addErr(d.Name.Loc, "KnownDirectivesRule", "Directive %q may not be used on %s.", "@"+dirName, loc) } validateArgumentTypes(c, d.Arguments, dd.Arguments, d.Name.Loc, @@ -682,20 +697,49 @@ func validateDirectives(c *opContext, loc string, directives ast.DirectiveList) func() string { return fmt.Sprintf("Directive %q", "@"+dirName) }, ) } + + for n := range directiveNames { + dd, ok := c.schema.Directives[n] + if !ok { + // Invalid directive will have been flagged already + continue + } + + if dd.Repeatable { + continue + } + + ds := directiveNames[n] + if len(ds) <= 1 { + continue + } + + for _, loc := range ds[1:] { + // Duplicate directive errors are inconsistent with the behaviour for other types in graphql-js + // Instead of reporting a single error with all locations, errors are reported for each duplicate after the first declaration + // with the original location, and the duplicate. Behaviour is replicated here, as we use those tests to validate the implementation + validateNameCustomMsg(c.context, []errors.Location{ds[0], loc}, "UniqueDirectivesPerLocationRule", func() string { + return fmt.Sprintf("The directive %q can only be used once at this location.", "@"+n) + }) + } + } } -func validateName(c *context, set nameSet, name ast.Ident, rule string, kind string) { - validateNameCustomMsg(c, set, name, rule, func() string { - return fmt.Sprintf("There can be only one %s named %q.", kind, name.Name) +func validateName(c *context, locs []errors.Location, name string, rule string, kind string) { + validateNameCustomMsg(c, locs, rule, func() string { + if kind == "variable" { + return fmt.Sprintf("There can be only one %s named %q.", kind, "$"+name) + } + + return fmt.Sprintf("There can be only one %s named %q.", kind, name) }) } -func validateNameCustomMsg(c *context, set nameSet, name ast.Ident, rule string, msg func() string) { - if loc, ok := set[name.Name]; ok { - c.addErrMultiLoc([]errors.Location{loc, name.Loc}, rule, msg()) +func validateNameCustomMsg(c *context, locs []errors.Location, rule string, msg func() string) { + if len(locs) > 1 { + c.addErrMultiLoc(locs, rule, msg()) return } - set[name.Name] = name.Loc } func validateArgumentTypes(c *opContext, args ast.ArgumentList, argDecls ast.ArgumentsDefinition, loc errors.Location, owner1, owner2 func() string) { @@ -713,28 +757,48 @@ func validateArgumentTypes(c *opContext, args ast.ArgumentList, argDecls ast.Arg for _, decl := range argDecls { if _, ok := decl.Type.(*ast.NonNull); ok { if _, ok := args.Get(decl.Name.Name); !ok { - c.addErr(loc, "ProvidedNonNullArguments", "%s argument %q of type %q is required but not provided.", owner2(), decl.Name.Name, decl.Type) + if decl.Default != nil { + continue + } + + c.addErr(loc, "ProvidedRequiredArgumentsRule", "%s argument %q of type %q is required, but it was not provided.", owner2(), decl.Name.Name, decl.Type) } } } } func validateArgumentLiterals(c *opContext, args ast.ArgumentList) { - argNames := make(nameSet) + argNames := make(nameSet, len(args)) for _, arg := range args { - validateName(c.context, argNames, arg.Name, "UniqueArgumentNames", "argument") validateLiteral(c, arg.Value) + + argNames[arg.Name.Name] = append(argNames[arg.Name.Name], arg.Name.Loc) + } + + for n, locs := range argNames { + validateName(c.context, locs, n, "UniqueArgumentNamesRule", "argument") } } func validateLiteral(c *opContext, l ast.Value) { switch l := l.(type) { case *ast.ObjectValue: - fieldNames := make(nameSet) + fieldNames := make(nameSet, len(l.Fields)) for _, f := range l.Fields { - validateName(c.context, fieldNames, f.Name, "UniqueInputFieldNames", "input field") + fieldNames[f.Name.Name] = append(fieldNames[f.Name.Name], f.Name.Loc) validateLiteral(c, f.Value) } + + for n, locs := range fieldNames { + if len(locs) <= 1 { + continue + } + + // Similar to for directives, duplicates here aren't all reported together but using an error for each duplicate + for _, loc := range locs[1:] { + validateName(c.context, []errors.Location{locs[0], loc}, n, "UniqueInputFieldNamesRule", "input field") + } + } case *ast.ListValue: for _, entry := range l.Values { validateLiteral(c, entry) @@ -750,7 +814,7 @@ func validateLiteral(c *opContext, l ast.Value) { c.opErrs[op] = append(c.opErrs[op], &errors.QueryError{ Message: fmt.Sprintf("Variable %q is not defined%s.", "$"+l.Name, byOp), Locations: []errors.Location{l.Loc, op.Loc}, - Rule: "NoUndefinedVariables", + Rule: "NoUndefinedVariablesRule", }) continue } @@ -766,10 +830,12 @@ func validateValueType(c *opContext, v ast.Value, t ast.Type) (bool, string) { if v2 := op.Vars.Get(v.Name); v2 != nil { t2, err := common.ResolveType(v2.Type, c.schema.Resolve) if _, ok := t2.(*ast.NonNull); !ok && v2.Default != nil { - t2 = &ast.NonNull{OfType: t2} + if _, ok := v2.Default.(*ast.NullValue); !ok { + t2 = &ast.NonNull{OfType: t2} + } } if err == nil && !typeCanBeUsedAs(t2, t) { - c.addErrMultiLoc([]errors.Location{v2.Loc, v.Loc}, "VariablesInAllowedPosition", "Variable %q of type %q used in position expecting type %q.", "$"+v.Name, t2, t) + c.addErrMultiLoc([]errors.Location{v2.Loc, v.Loc}, "VariablesInAllowedPositionRule", "Variable %q of type %q used in position expecting type %q.", "$"+v.Name, t2, t) } } } @@ -918,6 +984,8 @@ func canBeInput(t ast.Type) bool { return canBeInput(t.OfType) case *ast.NonNull: return canBeInput(t.OfType) + case nil: + return true default: return false } diff --git a/internal/validation/validation_test.go b/internal/validation/validation_test.go index 09150420f..31d056567 100644 --- a/internal/validation/validation_test.go +++ b/internal/validation/validation_test.go @@ -25,6 +25,20 @@ type Test struct { } func TestValidate(t *testing.T) { + skip := map[string]struct{}{ + // graphql-js test case parses SDL as if it was a query here, which fails since we only accept a query + "Validate: Directives Are Unique Per Location/unknown directives must be ignored": {}, + // The meta schema always includes the standard types, so this isn't applicable + "Validate: Known type names/references to standard scalars that are missing in schema": {}, + // Ignore tests using experimental @stream + "Validate: Overlapping fields can be merged/different stream directive label": {}, + "Validate: Overlapping fields can be merged/different stream directive initialCount": {}, + "Validate: Overlapping fields can be merged/different stream directive first missing args": {}, + "Validate: Overlapping fields can be merged/different stream directive second missing args": {}, + "Validate: Overlapping fields can be merged/different stream directive extra argument": {}, + "Validate: Overlapping fields can be merged/mix of stream and no stream": {}, + } + f, err := os.Open("testdata/tests.json") if err != nil { t.Fatal(err) @@ -40,18 +54,33 @@ func TestValidate(t *testing.T) { schemas := make([]*ast.Schema, len(testData.Schemas)) for i, schemaStr := range testData.Schemas { - schemas[i] = schema.New() - err := schema.Parse(schemas[i], schemaStr, false) + s := schema.New() + + s.Directives["oneOf"] = &ast.DirectiveDefinition{ + // graphql-js includes support for @oneOf, currently in RFC + // This is not available in graphql-go, nor is it expected to be unless the RFC is accepted + // See https://github.com/graphql/graphql-js/pull/3513 & https://github.com/graphql/graphql-spec/pull/825/ + Name: "oneOf", + Desc: "Indicates exactly one field must be supplied and this field must not be `null`.", + Locations: []string{"INPUT_OBJECT"}, + } + + err := schema.Parse(s, schemaStr, false) if err != nil { t.Fatal(err) } + schemas[i] = s } for _, test := range testData.Tests { t.Run(test.Name, func(t *testing.T) { + if _, ok := skip[test.Name]; ok { + t.Skip("Test ignored") + } + d, err := query.Parse(test.Query) if err != nil { - t.Fatal(err) + t.Fatalf("failed to parse query: %s", err) } errs := validation.Validate(schemas[test.Schema], d, test.Vars, 0) got := []*errors.QueryError{} @@ -64,7 +93,7 @@ func TestValidate(t *testing.T) { sortLocations(test.Errors) sortLocations(got) if !reflect.DeepEqual(test.Errors, got) { - t.Errorf("wrong errors\nexpected: %v\ngot: %v", test.Errors, got) + t.Errorf("wrong errors for rule %q\nexpected: %v\ngot: %v", test.Rule, test.Errors, got) } }) }