You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! :)
The text was updated successfully, but these errors were encountered:
Yep, this looks like a true issue. For input type default values we apparently just compare it's stringified value instead of doing a deep comparison. Could you maybe lexicographically sort the other schema as well before doing the comparison (as a temporary workaround).
The proper fix we should probably put in place is to lexicographically sort the value we stringify.
Hello! My colleague reported a bug where
findDangerousChanges
reports invalid dangerous change after serializing the schema withlexicographicSortSchema
and then deserializing it again. I tried to reproduce the error here: kiwicom/graphql-bc-checker@f5fa6be#diff-b3245f2dbca2b4c14d7bc1ff7eef9c87Note 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:
Thanks for checking it! :)
The text was updated successfully, but these errors were encountered: