1 | import { GraphQLProject } from "./base";
|
2 | import { GraphQLSchema, FragmentDefinitionNode, FragmentSpreadNode, OperationDefinitionNode, DocumentNode, FieldNode, ObjectTypeDefinitionNode, DefinitionNode } from "graphql";
|
3 | import { NotificationHandler } from "vscode-languageserver";
|
4 | import { LoadingHandler } from "../loadingHandler";
|
5 | import { SchemaTag, ServiceID, ClientIdentity } from "../engine";
|
6 | import { ClientConfig } from "../config";
|
7 | import { DiagnosticSet } from "../diagnostics";
|
8 | import URI from "vscode-uri";
|
9 | export declare function isClientProject(project: GraphQLProject): project is GraphQLClientProject;
|
10 | export interface GraphQLClientProjectConfig {
|
11 | clientIdentity?: ClientIdentity;
|
12 | config: ClientConfig;
|
13 | rootURI: URI;
|
14 | loadingHandler: LoadingHandler;
|
15 | }
|
16 | export declare class GraphQLClientProject extends GraphQLProject {
|
17 | rootURI: URI;
|
18 | serviceID?: string;
|
19 | config: ClientConfig;
|
20 | private serviceSchema?;
|
21 | private _onDecorations?;
|
22 | private _onSchemaTags?;
|
23 | private fieldStats?;
|
24 | private _validationRules?;
|
25 | diagnosticSet?: DiagnosticSet;
|
26 | constructor({ config, loadingHandler, rootURI, clientIdentity }: GraphQLClientProjectConfig);
|
27 | get displayName(): string;
|
28 | initialize(): Promise<void>[];
|
29 | getProjectStats(): {
|
30 | type: string;
|
31 | serviceId: string | undefined;
|
32 | types: {
|
33 | service: number;
|
34 | client: number;
|
35 | total: number;
|
36 | };
|
37 | tag: string;
|
38 | loaded: boolean;
|
39 | lastFetch: number | undefined;
|
40 | };
|
41 | onDecorations(handler: (any: any) => void): void;
|
42 | onSchemaTags(handler: NotificationHandler<[ServiceID, SchemaTag[]]>): void;
|
43 | updateSchemaTag(tag: SchemaTag): Promise<void>;
|
44 | private loadServiceSchema;
|
45 | resolveSchema(): Promise<GraphQLSchema>;
|
46 | get clientSchema(): DocumentNode;
|
47 | get missingApolloClientDirectives(): readonly DefinitionNode[];
|
48 | private addClientMetadataToSchemaNodes;
|
49 | validate(): Promise<void>;
|
50 | loadEngineData(): Promise<void>;
|
51 | generateDecorations(): void;
|
52 | get fragments(): {
|
53 | [fragmentName: string]: FragmentDefinitionNode;
|
54 | };
|
55 | get operations(): {
|
56 | [operationName: string]: OperationDefinitionNode;
|
57 | };
|
58 | get mergedOperationsAndFragments(): {
|
59 | [operationName: string]: DocumentNode;
|
60 | };
|
61 | get mergedOperationsAndFragmentsForService(): {
|
62 | [operationName: string]: DocumentNode;
|
63 | };
|
64 | getOperationFieldsFromFieldDefinition(fieldName: string, parent: ObjectTypeDefinitionNode | null): FieldNode[];
|
65 | fragmentSpreadsForFragment(fragmentName: string): FragmentSpreadNode[];
|
66 | }
|
67 |
|
\ | No newline at end of file |