Files
30-seconds-of-code/node_modules/graphql/utilities/isValidJSValue.js
2019-08-20 15:52:05 +02:00

23 lines
505 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isValidJSValue = isValidJSValue;
var _coerceValue = require("./coerceValue");
/* istanbul ignore file */
/**
* Deprecated. Use coerceValue() directly for richer information.
*
* This function will be removed in v15
*/
function isValidJSValue(value, type) {
var errors = (0, _coerceValue.coerceValue)(value, type).errors;
return errors ? errors.map(function (error) {
return error.message;
}) : [];
}