12345678910111213141516171819 |
- import { type GraphQLInputType } from '../type/definition';
- import { coerceValue } from './coerceValue';
- export function isValidJSValue(
- value: mixed,
- type: GraphQLInputType,
- ): Array<string> {
- const errors = coerceValue(value, type).errors;
- return errors ? errors.map(error => error.message) : [];
- }
|