UNPKG

1.13 kBTypeScriptView Raw
1import { DocumentNode, GraphQLSchema, SourceLocation, ValidationRule } from 'graphql';
2import { Range } from 'graphql-language-service-utils';
3import { DiagnosticSeverity, Diagnostic } from 'vscode-languageserver-types';
4export declare const SEVERITY: {
5 Error: "Error";
6 Warning: "Warning";
7 Information: "Information";
8 Hint: "Hint";
9};
10export declare type Severity = typeof SEVERITY;
11export declare type SeverityEnum = keyof Severity;
12export declare const DIAGNOSTIC_SEVERITY: {
13 Error: DiagnosticSeverity;
14 Warning: DiagnosticSeverity;
15 Information: DiagnosticSeverity;
16 Hint: DiagnosticSeverity;
17};
18export declare function getDiagnostics(query: string, schema?: GraphQLSchema | null | undefined, customRules?: Array<ValidationRule>, isRelayCompatMode?: boolean): Array<Diagnostic>;
19export declare function validateQuery(ast: DocumentNode, schema?: GraphQLSchema | null | undefined, customRules?: Array<ValidationRule> | null, isRelayCompatMode?: boolean): Array<Diagnostic>;
20export declare function getRange(location: SourceLocation, queryText: string): Range;
21//# sourceMappingURL=getDiagnostics.d.ts.map
\No newline at end of file