Automattic\WooCommerce\Vendor\GraphQL\Validator\Rules

QueryComplexity::fieldDefinitionprotectedWC 1.0

Method of the class: QueryComplexity{}

No Hooks.

Returns

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->fieldDefinition( $field ): ?FieldDefinition;
$field(FieldNode) (required)
.

QueryComplexity::fieldDefinition() code WC 10.9.1

protected function fieldDefinition(FieldNode $field): ?FieldDefinition
{
    foreach ($this->fieldNodeAndDefs[$this->getFieldName($field)] ?? [] as [$node, $def]) {
        if ($node === $field) {
            return $def;
        }
    }

    return null;
}