1 | import { TypeSystemDefinitionNode, TypeSystemExtensionNode, DefinitionNode, GraphQLSchema } from "graphql";
|
2 | import { TextDocument, NotificationHandler, PublishDiagnosticsParams, Position } from "vscode-languageserver";
|
3 | import { GraphQLDocument } from "../document";
|
4 | import { LoadingHandler } from "../loadingHandler";
|
5 | import { FileSet } from "../fileSet";
|
6 | import { ApolloConfig } from "../config";
|
7 | import { GraphQLSchemaProvider, SchemaResolveConfig } from "../providers/schema";
|
8 | import { ApolloEngineClient, ClientIdentity } from "../engine";
|
9 | export declare type DocumentUri = string;
|
10 | export interface GraphQLProjectConfig {
|
11 | clientIdentity?: ClientIdentity;
|
12 | config: ApolloConfig;
|
13 | fileSet: FileSet;
|
14 | loadingHandler: LoadingHandler;
|
15 | }
|
16 | export interface TypeStats {
|
17 | service?: number;
|
18 | client?: number;
|
19 | total?: number;
|
20 | }
|
21 | export interface ProjectStats {
|
22 | type: string;
|
23 | loaded: boolean;
|
24 | serviceId?: string;
|
25 | types?: TypeStats;
|
26 | tag?: string;
|
27 | lastFetch?: number;
|
28 | }
|
29 | export declare abstract class GraphQLProject implements GraphQLSchemaProvider {
|
30 | schemaProvider: GraphQLSchemaProvider;
|
31 | protected _onDiagnostics?: NotificationHandler<PublishDiagnosticsParams>;
|
32 | private _isReady;
|
33 | private readyPromise;
|
34 | protected engineClient?: ApolloEngineClient;
|
35 | private needsValidation;
|
36 | protected documentsByFile: Map<DocumentUri, GraphQLDocument[]>;
|
37 | config: ApolloConfig;
|
38 | schema?: GraphQLSchema;
|
39 | private fileSet;
|
40 | protected loadingHandler: LoadingHandler;
|
41 | protected lastLoadDate?: number;
|
42 | constructor({ config, fileSet, loadingHandler, clientIdentity, }: GraphQLProjectConfig);
|
43 | abstract get displayName(): string;
|
44 | protected abstract initialize(): Promise<void>[];
|
45 | abstract getProjectStats(): ProjectStats;
|
46 | get isReady(): boolean;
|
47 | get engine(): ApolloEngineClient;
|
48 | get whenReady(): Promise<void>;
|
49 | updateConfig(config: ApolloConfig): Promise<void>[];
|
50 | resolveSchema(config: SchemaResolveConfig): Promise<GraphQLSchema>;
|
51 | resolveFederatedServiceSDL(): Promise<string | void>;
|
52 | onSchemaChange(handler: NotificationHandler<GraphQLSchema>): import("../providers/schema").SchemaChangeUnsubscribeHandler;
|
53 | onDiagnostics(handler: NotificationHandler<PublishDiagnosticsParams>): void;
|
54 | includesFile(uri: DocumentUri): boolean;
|
55 | scanAllIncludedFiles(): Promise<void>;
|
56 | fileDidChange(uri: DocumentUri): void;
|
57 | fileWasDeleted(uri: DocumentUri): void;
|
58 | documentDidChange(document: TextDocument): void;
|
59 | checkForDuplicateOperations(): void;
|
60 | private removeGraphQLDocumentsFor;
|
61 | protected invalidate(): void;
|
62 | private validateIfNeeded;
|
63 | abstract validate(): void;
|
64 | clearAllDiagnostics(): void;
|
65 | documentsAt(uri: DocumentUri): GraphQLDocument[] | undefined;
|
66 | documentAt(uri: DocumentUri, position: Position): GraphQLDocument | undefined;
|
67 | get documents(): GraphQLDocument[];
|
68 | get definitions(): DefinitionNode[];
|
69 | definitionsAt(uri: DocumentUri): DefinitionNode[];
|
70 | get typeSystemDefinitionsAndExtensions(): (TypeSystemDefinitionNode | TypeSystemExtensionNode)[];
|
71 | }
|
72 | //# sourceMappingURL=base.d.ts.map |
\ | No newline at end of file |