graphql/utilities/find_breaking_changes.py
def find_types_that_changed_kind(
    old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[BreakingChange]:
    """Find types that changed kind

    Given two schemas, returns a list containing descriptions of any breaking changes
    in the newSchema related to changing the type of a type.
    """
    old_type_map = old_schema.type_map
    new_type_map = new_schema.type_map

    breaking_changes = []
    for type_name in old_type_map:
        if type_name not in new_type_map:
            continue
        old_type = old_type_map[type_name]
        new_type = new_type_map[type_name]
        if old_type.__class__ is not new_type.__class__:
            breaking_changes.append(
                BreakingChange(
                    BreakingChangeType.TYPE_CHANGED_KIND,
                    f"{type_name} changed from {type_kind_name(old_type)}"
                    f" to {type_kind_name(new_type)}.",
                )
            )
    return breaking_changes
Find types that changed kind

    Given two schemas, returns a list containing descriptions of any breaking changes
    in the newSchema related to changing the type of a type.
    
Find types that changed kind
Given two schemas, returns a list containing descriptions of any breaking changes
in the newSchema related to changing the type of a type.
Find types that changed kind Given two schemas returns a list containing descriptions of any breaking changes in the newSchema related to changing the type of a type .
def find_types_that_changed_kind(
    old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[BreakingChange]:
    old_type_map = old_schema.type_map
    new_type_map = new_schema.type_map
    breaking_changes = []
    for type_name in old_type_map:
        if type_name not in new_type_map:
            continue
        old_type = old_type_map[type_name]
        new_type = new_type_map[type_name]
        if old_type.__class__ is not new_type.__class__:
            breaking_changes.append(
                BreakingChange(
                    BreakingChangeType.TYPE_CHANGED_KIND,
                    f"{type_name} changed from {type_kind_name(old_type)}"
                    f" to {type_kind_name(new_type)}.",
                )
            )
    return breaking_changes
def find_types_that_changed_kind ( old_schema : GraphQLSchema , new_schema : GraphQLSchema ) -> List [ BreakingChange ] : old_type_map = old_schema . type_map new_type_map = new_schema . type_map breaking_changes = [ ] for type_name in old_type_map : if type_name not in new_type_map : continue old_type = old_type_map [ type_name ] new_type = new_type_map [ type_name ] if old_type . __class__ is not new_type . __class__ : breaking_changes . append ( BreakingChange ( BreakingChangeType . TYPE_CHANGED_KIND , f"{type_name} changed from {type_kind_name(old_type)}" f" to {type_kind_name(new_type)}." , ) ) return breaking_changes
Find types that changed kind
Given two schemas, returns a list containing descriptions of any breaking changes
in the newSchema related to changing the type of a type.
Find types that changed kind Given two schemas returns a list containing descriptions of any breaking changes in the newSchema related to changing the type of a type .
"""Find types that changed kind

    Given two schemas, returns a list containing descriptions of any breaking changes
    in the newSchema related to changing the type of a type.
    """
old_schema
GraphQLSchema
new_schema
GraphQLSchema