Skip to content

Commit d681d2b

Browse files
JoviDeCroockyaacovCR
authored andcommitted
fix bug in safe argument changes
1 parent e4d7e85 commit d681d2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utilities/findSchemaChanges.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ function findInputObjectTypeChanges(
328328
`Field ${oldType}.${oldField.name} changed type from ` +
329329
`${String(oldField.type)} to ${String(newField.type)}.`,
330330
});
331-
} else {
331+
} else if (oldField.type.toString() !== newField.type.toString()) {
332332
schemaChanges.push({
333333
type: SafeChangeType.FIELD_CHANGED_KIND_SAFE,
334334
description:
@@ -368,7 +368,7 @@ function findUnionTypeChanges(
368368
function findEnumTypeChanges(
369369
oldType: GraphQLEnumType,
370370
newType: GraphQLEnumType,
371-
): Array<BreakingChange | DangerousChange> {
371+
): Array<SchemaChange> {
372372
const schemaChanges = [];
373373
const valuesDiff = diff(oldType.getValues(), newType.getValues());
374374

@@ -520,7 +520,7 @@ function findArgChanges(
520520
type: SafeChangeType.ARG_DEFAULT_VALUE_ADDED,
521521
description: `${oldType}.${oldField.name}(${oldArg.name}:) added a defaultValue ${newValueStr}.`,
522522
});
523-
} else {
523+
} else if (oldArg.type.toString() !== newArg.type.toString()) {
524524
schemaChanges.push({
525525
type: SafeChangeType.ARG_CHANGED_KIND_SAFE,
526526
description:

0 commit comments

Comments
 (0)