Skip to content

findDangerousChanges doesn't work as expected after lexicographic sort and deserialization #2150

Closed
@mrtnzlml

Description

@mrtnzlml

Hello! My colleague reported a bug where findDangerousChanges reports invalid dangerous change after serializing the schema with lexicographicSortSchema and then deserializing it again. I tried to reproduce the error here: kiwicom/graphql-bc-checker@f5fa6be#diff-b3245f2dbca2b4c14d7bc1ff7eef9c87

Note that we are using one schema which has unsorted args, then printing it into a string and later trying to compare this string (potentially saved on disk) with the actual schema. It should not report any dangerous changes but it does report this:

{
  "description": "RootQueryType.xxx arg yyy has changed defaultValue from {aaa: \\"aaa\\", bbb: \\"bbb\\"} to {bbb: \\"bbb\\", aaa: \\"aaa\\"}.",
  "type": "ARG_DEFAULT_VALUE_CHANGE",
}

Thanks for checking it! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions