PHP Class GraphQL\Validator\Rules\QueryDepth

Inheritance: extends AbstractQuerySecurity
Show file Open project: webonyx/graphql-php Class Usage Examples

Public Methods

Method Description
__construct ( $maxQueryDepth )
__invoke ( ValidationContext $context )
getMaxQueryDepth ( )
maxQueryDepthErrorMessage ( $max, $count )
setMaxQueryDepth ( $maxQueryDepth ) Set max query depth. If equal to 0 no check is done. Must be greater or equal to 0.

Protected Methods

Method Description
isEnabled ( )

Private Methods

Method Description
fieldDepth ( $node, $depth, $maxDepth )
nodeDepth ( Node $node, $depth, $maxDepth )

Method Details

__construct() public method

public __construct ( $maxQueryDepth )

__invoke() public method

public __invoke ( ValidationContext $context )
$context GraphQL\Validator\ValidationContext

getMaxQueryDepth() public method

public getMaxQueryDepth ( )

isEnabled() protected method

protected isEnabled ( )

maxQueryDepthErrorMessage() public static method

public static maxQueryDepthErrorMessage ( $max, $count )

setMaxQueryDepth() public method

Set max query depth. If equal to 0 no check is done. Must be greater or equal to 0.
public setMaxQueryDepth ( $maxQueryDepth )
$maxQueryDepth