PHP Class GraphQL\Type\Definition\Config

Mostra file Open project: webonyx/graphql-php Class Usage Examples

Public Methods

Method Description
arrayOf ( array | integer $definition, integer $flags ) : stdClass
disableValidation ( ) Disables config validation
enableValidation ( $allowCustomOptions = true ) Enable deep config validation (disabled by default because it creates significant performance overhead).
map ( array $definition, integer $flags ) : stdClass
validate ( array $config, array $definition )
validateField ( $typeName, array $config, array $definition )

Private Methods

Method Description
getFlags ( $def ) : mixed
validateEntry ( $typeName, $key, $value, $def, $pathStr )
validateMap ( $typeName, array $map, array $definitions, null $pathStr = null )

Method Details

arrayOf() public static method

public static arrayOf ( array | integer $definition, integer $flags ) : stdClass
$definition array | integer
$flags integer
return stdClass

disableValidation() public static method

Disables config validation
public static disableValidation ( )

enableValidation() public static method

Useful only at development to catch type definition errors quickly.
public static enableValidation ( $allowCustomOptions = true )

map() public static method

public static map ( array $definition, integer $flags ) : stdClass
$definition array
$flags integer
return stdClass

validate() public static method

public static validate ( array $config, array $definition )
$config array
$definition array

validateField() public static method

public static validateField ( $typeName, array $config, array $definition )
$typeName
$config array
$definition array