UNPKG

@graphql-eslint/eslint-plugin

Version:
22 lines (21 loc) 1.01 kB
import { FragmentDefinitionNode, OperationDefinitionNode, SelectionSetNode, OperationTypeNode } from 'graphql'; import { GraphQLProjectConfig } from 'graphql-config'; export declare type FragmentSource = { filePath: string; document: FragmentDefinitionNode; }; export declare type OperationSource = { filePath: string; document: OperationDefinitionNode; }; export declare type SiblingOperations = { available: boolean; getFragment(fragmentName: string): FragmentSource[]; getFragments(): FragmentSource[]; getFragmentByType(typeName: string): FragmentSource[]; getFragmentsInUse(baseOperation: OperationDefinitionNode | FragmentDefinitionNode | SelectionSetNode, recursive?: boolean): FragmentDefinitionNode[]; getOperation(operationName: string): OperationSource[]; getOperations(): OperationSource[]; getOperationByType(operationType: OperationTypeNode): OperationSource[]; }; export declare function getDocuments(project: GraphQLProjectConfig): SiblingOperations;