Automattic\WooCommerce\Vendor\GraphQL\Validator\Rules

QuerySecurityRule::getFieldNameprotectedWC 1.0

Method of the class: QuerySecurityRule{}

No Hooks.

Returns

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->getFieldName( $node ): string;
$node(FieldNode) (required)
.

QuerySecurityRule::getFieldName() code WC 10.9.1

protected function getFieldName(FieldNode $node): string
{
    $fieldName = $node->name->value;

    return $node->alias === null
        ? $fieldName
        : $node->alias->value;
}