@graphql-tools/utils
Version:
Common package containing utils and types for GraphQL tools
8 lines (7 loc) • 406 B
text/typescript
import { type GraphQLArgument, type GraphQLInputField, type ValueNode } from 'graphql';
/**
* `defaultValueAstFromType` extracts default value from `GraphQLArgument` or `GraphQLInputField`, if available.
*
* Handles both graphql@16 (`defaultValue`) and graphql@17 (`default`) shapes.
*/
export declare const defaultValueAstFromType: (arg: GraphQLArgument | GraphQLInputField) => ValueNode | undefined;