PHP 클래스 GraphQL\Validator\DocumentValidator

파일 보기 프로젝트 열기: webonyx/graphql-php 1 사용 예제들

공개 메소드들

메소드 설명
addRule ( $name, callable $rule )
allRules ( )
append ( &$arr, $items )
defaultRules ( )
getRule ( $name )
isError ( $value )
isValidLiteralValue ( Type $type, $valueNode ) : array Utility for validators which determines if a value literal AST is valid given an input type.
validate ( Schema $schema, DocumentNode $ast, array $rules = null )
visitUsingRules ( Schema $schema, TypeInfo $typeInfo, DocumentNode $documentNode, array $rules ) : array This uses a specialized visitor which runs multiple visitors in parallel, while maintaining the visitor skip and break API.

메소드 상세

addRule() 공개 정적인 메소드

public static addRule ( $name, callable $rule )
$rule callable

allRules() 공개 정적인 메소드

public static allRules ( )

append() 공개 정적인 메소드

public static append ( &$arr, $items )

defaultRules() 공개 정적인 메소드

public static defaultRules ( )

getRule() 공개 정적인 메소드

public static getRule ( $name )

isError() 공개 정적인 메소드

public static isError ( $value )

isValidLiteralValue() 공개 정적인 메소드

Note that this only validates literal values, variables are assumed to provide values of the correct type.
public static isValidLiteralValue ( Type $type, $valueNode ) : array
$type GraphQL\Type\Definition\Type
리턴 array

validate() 공개 정적인 메소드

public static validate ( Schema $schema, DocumentNode $ast, array $rules = null )
$schema GraphQL\Schema
$ast GraphQL\Language\AST\DocumentNode
$rules array

visitUsingRules() 공개 정적인 메소드

This uses a specialized visitor which runs multiple visitors in parallel, while maintaining the visitor skip and break API.
public static visitUsingRules ( Schema $schema, TypeInfo $typeInfo, DocumentNode $documentNode, array $rules ) : array
$schema GraphQL\Schema
$typeInfo GraphQL\Utils\TypeInfo
$documentNode GraphQL\Language\AST\DocumentNode
$rules array
리턴 array