Automattic\WooCommerce\Vendor\GraphQL\Validator\Rules

QueryComplexity::fieldComplexityprotectedWC 1.0

Метод класса: QueryComplexity{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->fieldComplexity( $selectionSet ): int;
$selectionSet(SelectionSetNode) (обязательный)
.

Код QueryComplexity::fieldComplexity() WC 11.0.1

protected function fieldComplexity(SelectionSetNode $selectionSet): int
{
    $complexity = 0;

    foreach ($selectionSet->selections as $selection) {
        $complexity += $this->nodeComplexity($selection);
    }

    return $complexity;
}