Skip to content

findBreakingChanges yields TYPE_REMOVED when a single instance of a scalar is removed #2197

Closed
@maxuuell

Description

@maxuuell

An interesting behavior was found when playing around with findBreakingChanges between two schemas.

When two schemas are compared, with one of them having only one Int type, and the second removes the only Int type, the breaking changes array will show:

[ { type: 'TYPE_REMOVED',
    description: 'Int was removed.' },
{ type: 'FIELD_REMOVED',
description: 'User.age was removed.' } ]

Should this be two breaking changes? It seems odd to say removing the last instance of a scalar type would be a breaking change, as opposed to removing a defined object type.

Does that mean when a schema is created, it will strip out any scalars that aren't being used?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions