Automattic\WooCommerce\Vendor\GraphQL\Validator\Rules
QueryComplexity::fieldComplexity
Method of the class: QueryComplexity{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->fieldComplexity( $selectionSet ): int;
- $selectionSet(SelectionSetNode) (required)
- .
QueryComplexity::fieldComplexity() QueryComplexity::fieldComplexity code WC 10.9.1
protected function fieldComplexity(SelectionSetNode $selectionSet): int
{
$complexity = 0;
foreach ($selectionSet->selections as $selection) {
$complexity += $this->nodeComplexity($selection);
}
return $complexity;
}