Automattic\WooCommerce\Vendor\GraphQL\Utils

BreakingChangesFinder::findBreakingChangespublic staticWC 1.0

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

Method of the class: BreakingChangesFinder{}

No Hooks.

Returns

Array. Change>

Usage

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

BreakingChangesFinder::findBreakingChanges() code WC 10.9.1

public static function findBreakingChanges(Schema $oldSchema, Schema $newSchema): array
{
    return array_merge(
        self::findRemovedTypes($oldSchema, $newSchema),
        self::findTypesThatChangedKind($oldSchema, $newSchema),
        self::findFieldsThatChangedTypeOnObjectOrInterfaceTypes($oldSchema, $newSchema),
        self::findFieldsThatChangedTypeOnInputObjectTypes($oldSchema, $newSchema)['breakingChanges'],
        self::findTypesRemovedFromUnions($oldSchema, $newSchema),
        self::findValuesRemovedFromEnums($oldSchema, $newSchema),
        self::findArgChanges($oldSchema, $newSchema)['breakingChanges'],
        self::findInterfacesRemovedFromObjectTypes($oldSchema, $newSchema),
        self::findRemovedDirectives($oldSchema, $newSchema),
        self::findRemovedDirectiveArgs($oldSchema, $newSchema),
        self::findAddedNonNullDirectiveArgs($oldSchema, $newSchema),
        self::findRemovedDirectiveLocations($oldSchema, $newSchema)
    );
}