UNPKG

430 BTypeScriptView Raw
1import { OperationDefinitionNode, FragmentDefinitionNode, Source } from 'graphql';
2export interface Document {
3 source: Source;
4 fragments: {
5 node: FragmentDefinitionNode;
6 source: string;
7 }[];
8 operations: {
9 node: OperationDefinitionNode;
10 source: string;
11 }[];
12 hasFragments: boolean;
13 hasOperations: boolean;
14}
15export declare function readDocument(source: Source): Document;