UNPKG

1.67 kBTypeScriptView Raw
1import { DocumentNode, FragmentSpreadNode, NamedTypeNode } from 'graphql';
2import { CompletionItem, Diagnostic, Uri, IPosition, Outline, GraphQLCache } from 'graphql-language-service-types';
3import { GraphQLConfig, GraphQLProjectConfig } from 'graphql-config';
4import { Hover, SymbolInformation } from 'vscode-languageserver-types';
5import { HoverConfig } from './getHoverInformation';
6import { DefinitionQueryResult } from './getDefinition';
7export declare class GraphQLLanguageService {
8 _graphQLCache: GraphQLCache;
9 _graphQLConfig: GraphQLConfig;
10 constructor(cache: GraphQLCache);
11 getConfigForURI(uri: Uri): GraphQLProjectConfig;
12 getDiagnostics(query: string, uri: Uri, isRelayCompatMode?: boolean): Promise<Array<Diagnostic>>;
13 getAutocompleteSuggestions(query: string, position: IPosition, filePath: Uri): Promise<Array<CompletionItem>>;
14 getHoverInformation(query: string, position: IPosition, filePath: Uri, options?: HoverConfig): Promise<Hover['contents']>;
15 getDefinition(query: string, position: IPosition, filePath: Uri): Promise<DefinitionQueryResult | null>;
16 getDocumentSymbols(document: string, filePath: Uri): Promise<SymbolInformation[]>;
17 _getDefinitionForNamedType(query: string, ast: DocumentNode, node: NamedTypeNode, filePath: Uri, projectConfig: GraphQLProjectConfig): Promise<DefinitionQueryResult | null>;
18 _getDefinitionForFragmentSpread(query: string, ast: DocumentNode, node: FragmentSpreadNode, filePath: Uri, projectConfig: GraphQLProjectConfig): Promise<DefinitionQueryResult | null>;
19 getOutline(documentText: string): Promise<Outline | null>;
20}
21//# sourceMappingURL=GraphQLLanguageService.d.ts.map
\No newline at end of file