Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (_value === null) {
return; // Intentionally return no value.
}
return coerceValue(type.ofType, _value);
}
if (_value === null) {
// Intentionally return the value null.
return null;
}
if (type instanceof GraphQLList) {
const itemType = type.ofType;
if (isCollection(_value)) {
const coercedValues = [];
const valueIter = createIterator((_value: any));
if (!valueIter) {
return; // Intentionally return no value.
}
let step;
while (!(step = valueIter.next()).done) {
const itemValue = coerceValue(itemType, step.value);
if (isInvalid(itemValue)) {
return; // Intentionally return no value.
}
coercedValues.push(itemValue);
}
return coercedValues;
}
const coercedValue = coerceValue(itemType, _value);
if (isInvalid(coercedValue)) {
return; // Intentionally return no value.
if (_value === null) {
return // Intentionally return no value.
}
return coerceValue(type.ofType, _value)
}
if (_value === null) {
// Intentionally return the value null.
return null
}
if (type instanceof GraphQLList) {
const itemType = type.ofType
if (isCollection(_value)) {
const coercedValues = []
const valueIter = createIterator(_value)
if (!valueIter) {
return // Intentionally return no value.
}
let step
/* tslint:disable */
while (!(step = valueIter.next()).done) {
/* tslint:enable */
const itemValue = coerceValue(itemType, step.value)
if (isInvalid(itemValue)) {
return // Intentionally return no value.
}
coercedValues.push(itemValue)
}
return coercedValues
}
const coercedValue = coerceValue(itemType, _value)