PHP Class GraphQL\Tests\Validator\QueryDepthTest

Inheritance: extends AbstractQuerySecurityTest
Show file Open project: webonyx/graphql-php

Public Methods

Method Description
queryDataProvider ( )
testComplexityIntrospectionQuery ( )
testFragmentQueries ( $queryDepth, integer $maxQueryDepth = 7, array $expectedErrors = [] )
testInlineFragmentQueries ( $queryDepth, integer $maxQueryDepth = 7, array $expectedErrors = [] )
testIntrospectionTypeMetaFieldQuery ( )
testSimpleQueries ( $queryDepth, integer $maxQueryDepth = 7, array $expectedErrors = [] )
testTypeNameMetaFieldQuery ( )

Protected Methods

Method Description
getErrorMessage ( $max, $count ) : string
getRule ( $maxDepth ) : QueryDepth

Private Methods

Method Description
buildRecursiveQuery ( $depth )
buildRecursiveQueryPart ( $depth )
buildRecursiveUsingFragmentQuery ( $depth )
buildRecursiveUsingInlineFragmentQuery ( $depth )

Method Details

getErrorMessage() protected method

protected getErrorMessage ( $max, $count ) : string
$max
$count
return string

getRule() protected method

protected getRule ( $maxDepth ) : QueryDepth
$maxDepth
return GraphQL\Validator\Rules\QueryDepth

queryDataProvider() public method

public queryDataProvider ( )

testComplexityIntrospectionQuery() public method

testFragmentQueries() public method

public testFragmentQueries ( $queryDepth, integer $maxQueryDepth = 7, array $expectedErrors = [] )
$queryDepth
$maxQueryDepth integer
$expectedErrors array

testInlineFragmentQueries() public method

public testInlineFragmentQueries ( $queryDepth, integer $maxQueryDepth = 7, array $expectedErrors = [] )
$queryDepth
$maxQueryDepth integer
$expectedErrors array

testIntrospectionTypeMetaFieldQuery() public method

testSimpleQueries() public method

public testSimpleQueries ( $queryDepth, integer $maxQueryDepth = 7, array $expectedErrors = [] )
$queryDepth
$maxQueryDepth integer
$expectedErrors array

testTypeNameMetaFieldQuery() public method