UNPKG

1.12 kBTypeScriptView Raw
1import { GraphQLSchema, GraphQLError, FragmentDefinitionNode } from "graphql";
2import { Diagnostic, DiagnosticSeverity } from "vscode-languageserver";
3import { GraphQLDocument } from "./document";
4import { DocumentUri } from "./project/base";
5import { ValidationRule } from "graphql/validation/ValidationContext";
6export declare function collectExecutableDefinitionDiagnositics(schema: GraphQLSchema, queryDocument: GraphQLDocument, fragments?: {
7 [fragmentName: string]: FragmentDefinitionNode;
8}, rules?: ValidationRule[]): Diagnostic[];
9export declare function diagnosticsFromError(error: GraphQLError, severity: DiagnosticSeverity, type: string): GraphQLDiagnostic[];
10export interface GraphQLDiagnostic extends Diagnostic {
11 error: GraphQLError;
12}
13export declare namespace GraphQLDiagnostic {
14 function is(diagnostic: Diagnostic): diagnostic is GraphQLDiagnostic;
15}
16export declare class DiagnosticSet {
17 private diagnosticsByFile;
18 entries(): IterableIterator<[string, Diagnostic[]]>;
19 addDiagnostics(uri: DocumentUri, diagnostics: Diagnostic[]): void;
20}
21//# sourceMappingURL=diagnostics.d.ts.map
\No newline at end of file