Automattic\WooCommerce\Vendor\GraphQL\Utils

SchemaPrinter::printUnionprotected staticWC 1.0

Method of the class: SchemaPrinter{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = SchemaPrinter::printUnion( $type, $options ): string;
$type(UnionType) (required)
.
$options(array) (required)
.

SchemaPrinter::printUnion() code WC 10.9.4

protected static function printUnion(UnionType $type, array $options): string
{
    $types = $type->getTypes();
    $types = $types === []
        ? ''
        : ' = ' . implode(' | ', $types);

    return static::printDescription($options, $type) . 'union ' . $type->name . $types;
}