@envelop/extended-validation
Advanced tools
Comparing version 4.1.0-alpha-20240812203512-43551114 to 4.1.0
@@ -90,5 +90,12 @@ "use strict"; | ||
currentData = currentData[pathItem] ||= | ||
typeof path[Number(pathItemIndex) + 1] === 'number' ? [] : {}; | ||
typeof path[Number(pathItemIndex) + 1] === 'number' || | ||
path[Number(pathItemIndex) + 1] | ||
? [] | ||
: {}; | ||
if (Array.isArray(currentData)) { | ||
currentData = currentData.map((c, i) => visitPath(path.slice(Number(pathItemIndex) + 1), c)); | ||
let pathItemIndexInArray = Number(pathItemIndex) + 1; | ||
if (path[pathItemIndexInArray] === '@') { | ||
pathItemIndexInArray = Number(pathItemIndex) + 2; | ||
} | ||
currentData = currentData.map((c, i) => visitPath(path.slice(pathItemIndexInArray), c)); | ||
} | ||
@@ -95,0 +102,0 @@ } |
@@ -86,5 +86,12 @@ import { TypeInfo, ValidationContext, visit, visitInParallel, visitWithTypeInfo, } from 'graphql'; | ||
currentData = currentData[pathItem] ||= | ||
typeof path[Number(pathItemIndex) + 1] === 'number' ? [] : {}; | ||
typeof path[Number(pathItemIndex) + 1] === 'number' || | ||
path[Number(pathItemIndex) + 1] | ||
? [] | ||
: {}; | ||
if (Array.isArray(currentData)) { | ||
currentData = currentData.map((c, i) => visitPath(path.slice(Number(pathItemIndex) + 1), c)); | ||
let pathItemIndexInArray = Number(pathItemIndex) + 1; | ||
if (path[pathItemIndexInArray] === '@') { | ||
pathItemIndexInArray = Number(pathItemIndex) + 2; | ||
} | ||
currentData = currentData.map((c, i) => visitPath(path.slice(pathItemIndexInArray), c)); | ||
} | ||
@@ -91,0 +98,0 @@ } |
{ | ||
"name": "@envelop/extended-validation", | ||
"version": "4.1.0-alpha-20240812203512-43551114", | ||
"version": "4.1.0", | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
"@envelop/core": "^5.0.0", | ||
"@envelop/core": "^5.0.2", | ||
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" | ||
@@ -8,0 +8,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
30439
449
1