Automattic\WooCommerce\Vendor\GraphQL\Utils

BreakingChangesFinder::getDirectiveMapForSchema │ private static │ WC 1.0

Method of the class: BreakingChangesFinder{}

No Hooks.

Returns

array<string, Directive>.

Usage

$result = BreakingChangesFinder::getDirectiveMapForSchema( $schema ): array;
$schema(Schema) (required)
.

BreakingChangesFinder::getDirectiveMapForSchema() code WC 11.1.2

private static function getDirectiveMapForSchema(Schema $schema): array
{
    $directives = [];
    foreach ($schema->getDirectives() as $directive) {
        $directives[$directive->name] = $directive;
    }

    return $directives;
}