@graphql-tools/graphql
Version:
Fork of GraphQL.js
9 lines (8 loc) • 433 B
text/typescript
import { GraphQLError } from '../error/GraphQLError.cjs';
import type { GraphQLInputType } from '../type/definition.cjs';
declare type OnErrorCB = (path: ReadonlyArray<string | number>, invalidValue: unknown, error: GraphQLError) => void;
/**
* Coerces a JavaScript value given a GraphQL Input Type.
*/
export declare function coerceInputValue(inputValue: unknown, type: GraphQLInputType, onError?: OnErrorCB): unknown;
export {};