UNPKG

@envelop/extended-validation

Version:

Extended validation plugin adds support for writing GraphQL validation rules, that has access to all `execute` parameters, including variables.

6 lines (5 loc) 356 B
import { ASTVisitor, DirectiveNode, ExecutionArgs, ValidationContext } from 'graphql'; export type ExtendedValidationRule = (context: ValidationContext, executionArgs: ExecutionArgs) => ASTVisitor; export declare function getDirectiveFromAstNode(astNode: { directives?: ReadonlyArray<DirectiveNode>; }, names: string | string[]): null | DirectiveNode;