mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
15 lines
431 B
TypeScript
15 lines
431 B
TypeScript
import { ValueNode } from '../language/ast';
|
|
import { GraphQLInputType } from '../type/definition';
|
|
|
|
/**
|
|
* Utility for validators which determines if a value literal AST is valid given
|
|
* an input type.
|
|
*
|
|
* Note that this only validates literal values, variables are assumed to
|
|
* provide values of the correct type.
|
|
*/
|
|
export function isValidLiteralValue(
|
|
type: GraphQLInputType,
|
|
valueNode: ValueNode
|
|
): Array<string>
|