Automattic\WooCommerce\Vendor\GraphQL\Utils
BreakingChangesFinder::findRemovedDirectives
Method of the class: BreakingChangesFinder{}
No Hooks.
Returns
Array
Usage
$result = BreakingChangesFinder::findRemovedDirectives( $oldSchema, $newSchema ): array;
BreakingChangesFinder::findRemovedDirectives() BreakingChangesFinder::findRemovedDirectives code WC 10.9.1
public static function findRemovedDirectives(Schema $oldSchema, Schema $newSchema): array
{
$removedDirectives = [];
$newSchemaDirectiveMap = self::getDirectiveMapForSchema($newSchema);
foreach ($oldSchema->getDirectives() as $directive) {
if (! isset($newSchemaDirectiveMap[$directive->name])) {
$removedDirectives[] = [
'type' => self::BREAKING_CHANGE_DIRECTIVE_REMOVED,
'description' => "{$directive->name} was removed",
];
}
}
return $removedDirectives;
}