Automattic\WooCommerce\Vendor\GraphQL\Utils

TypeInfo::extractTypesFromDirectivespublic staticWC 1.0

Method of the class: TypeInfo{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = TypeInfo::extractTypesFromDirectives( $directive, $typeMap ): void;
$directive(Directive) (required)
.
$typeMap(array) (required)
.

TypeInfo::extractTypesFromDirectives() code WC 10.9.1

public static function extractTypesFromDirectives(Directive $directive, array &$typeMap): void
{
    foreach ($directive->args as $arg) {
        $argType = $arg->getType();
        assert($argType instanceof NamedType || $argType instanceof WrappingType);
        self::extractTypes($argType, $typeMap);
    }
}