UNPKG

1.49 kBTypeScriptView Raw
1import { FieldNode, ValidationContext, GraphQLSchema, DocumentNode, OperationDefinitionNode, FragmentDefinitionNode, InlineFragmentNode } from "graphql";
2import { TextEdit } from "vscode-languageserver";
3import { ValidationRule } from "graphql/validation/ValidationContext";
4export interface CodeActionInfo {
5 message: string;
6 edits: TextEdit[];
7}
8export declare const defaultValidationRules: ValidationRule[];
9export declare function getValidationErrors(schema: GraphQLSchema, document: DocumentNode, fragments?: {
10 [fragmentName: string]: FragmentDefinitionNode;
11}, rules?: ValidationRule[]): any;
12export declare function validateQueryDocument(schema: GraphQLSchema, document: DocumentNode): void;
13export declare function NoAnonymousQueries(context: ValidationContext): {
14 OperationDefinition(node: OperationDefinitionNode): boolean;
15};
16export declare function NoTypenameAlias(context: ValidationContext): {
17 Field(node: FieldNode): void;
18};
19export declare function NoMissingClientDirectives(context: ValidationContext): {
20 InlineFragment?: undefined;
21 FragmentDefinition?: undefined;
22 Field?: undefined;
23} | {
24 InlineFragment: (node: FieldNode | InlineFragmentNode | FragmentDefinitionNode) => false | undefined;
25 FragmentDefinition: (node: FieldNode | InlineFragmentNode | FragmentDefinitionNode) => false | undefined;
26 Field: (node: FieldNode | InlineFragmentNode | FragmentDefinitionNode) => false | undefined;
27};
28//# sourceMappingURL=validation.d.ts.map
\No newline at end of file