Automattic\WooCommerce\Vendor\GraphQL\Utils

BreakingChangesFinder::findDangerousChangespublic staticWC 1.0

Given two schemas, returns an Array containing descriptions of all the types of potentially dangerous changes covered by the other functions down below.

Method of the class: BreakingChangesFinder{}

No Hooks.

Returns

Array. Change>

Usage

$result = BreakingChangesFinder::findDangerousChanges( $oldSchema, $newSchema ): array;
$oldSchema(Schema) (required)
.
$newSchema(Schema) (required)
.

BreakingChangesFinder::findDangerousChanges() code WC 10.9.4

public static function findDangerousChanges(Schema $oldSchema, Schema $newSchema): array
{
    return array_merge(
        self::findArgChanges($oldSchema, $newSchema)['dangerousChanges'],
        self::findValuesAddedToEnums($oldSchema, $newSchema),
        self::findInterfacesAddedToObjectTypes($oldSchema, $newSchema),
        self::findTypesAddedToUnions($oldSchema, $newSchema),
        self::findFieldsThatChangedTypeOnInputObjectTypes($oldSchema, $newSchema)['dangerousChanges']
    );
}