UNPKG

@graphql-tools/utils

Version:

Common package containing utils and types for GraphQL tools

14 lines (13 loc) 673 B
import { ASTNode, DocumentNode, StringValueNode } from 'graphql'; import { GraphQLParseOptions } from './Interfaces.cjs'; export declare function parseGraphQLSDL(location: string | undefined, rawSDL: string, options?: GraphQLParseOptions): { location: string | undefined; document: DocumentNode; }; export declare function transformCommentsToDescriptions(sourceSdl: string, options?: GraphQLParseOptions): DocumentNode; type DiscriminateUnion<T, U> = T extends U ? T : never; type DescribableASTNodes = DiscriminateUnion<ASTNode, { description?: StringValueNode; }>; export declare function isDescribable(node: ASTNode): node is DescribableASTNodes; export {};