UNPKG

1.22 kBTypeScriptView Raw
1import { DocumentNode, FragmentDefinitionNode, GraphQLSchema, SourceLocation, ValidationRule } from 'graphql';
2import { DiagnosticSeverity, Diagnostic } from 'vscode-languageserver-types';
3import { IRange } from 'graphql-language-service-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, externalFragments?: FragmentDefinitionNode[] | string): 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): IRange;
21//# sourceMappingURL=getDiagnostics.d.ts.map
\No newline at end of file