UNPKG

672 BTypeScriptView Raw
1import { DocumentNode, ASTNode, StringValueNode } from 'graphql';
2import { GraphQLParseOptions } from './Interfaces.js';
3export declare function parseGraphQLSDL(location: string | undefined, rawSDL: string, options?: GraphQLParseOptions): {
4 location: string | undefined;
5 document: DocumentNode;
6};
7export declare function transformCommentsToDescriptions(sourceSdl: string, options?: GraphQLParseOptions): DocumentNode;
8type DiscriminateUnion<T, U> = T extends U ? T : never;
9type DescribableASTNodes = DiscriminateUnion<ASTNode, {
10 description?: StringValueNode;
11}>;
12export declare function isDescribable(node: ASTNode): node is DescribableASTNodes;
13export {};