graphql
Version:
A Query Language and Runtime which can target any service.
15 lines (13 loc) • 376 B
JavaScript
/* istanbul ignore file */
import { coerceValue } from './coerceValue';
/**
* Deprecated. Use coerceInputValue() directly for richer information.
*
* This function will be removed in v15
*/
export function isValidJSValue(value, type) {
var errors = coerceValue(value, type).errors;
return errors ? errors.map(function (error) {
return error.message;
}) : [];
}