UNPKG

443 BTypeScriptView Raw
1import { GraphQLError } from '../error/GraphQLError';
2import type { GraphQLInputType } from '../type/definition';
3declare type OnErrorCB = (
4 path: ReadonlyArray<string | number>,
5 invalidValue: unknown,
6 error: GraphQLError,
7) => void;
8/**
9 * Coerces a JavaScript value given a GraphQL Input Type.
10 */
11export declare function coerceInputValue(
12 inputValue: unknown,
13 type: GraphQLInputType,
14 onError?: OnErrorCB,
15): unknown;
16export {};