-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
Describe the bug
The SchemaDiff$CountingReporter reports a different breakingCount compared to the CapturingReporter.getBreakageCount().
I'm fairly certain its breakingCount field should be initialised with 0: https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/schema/diff/SchemaDiff.java#L73
To Reproduce
Given the following code:
var capturingReporter = new CapturingReporter();
var schemaDiff = new SchemaDiff();
var schema = <some GraphQLSchema>;
int breakingCount = schemaDiff.diffSchema(DiffSet.diffSet(schema, schema), capturingReporter);
System.out.println(breakingCount + " != " + capturingReporter.getBreakageCount());this will print 1 != 0
This also means that if you use the return value of the schemaDiff method to assert no breaking changes with breakingCount == 0, this will always fail.
Metadata
Metadata
Assignees
Labels
No labels