Title: SchemaDiff reports incorrect breakage count · Issue #2877 · graphql-java/graphql-java · GitHub
Open Graph Title: SchemaDiff reports incorrect breakage count · Issue #2877 · graphql-java/graphql-java
X Title: SchemaDiff reports incorrect breakage count · Issue #2877 · graphql-java/graphql-java
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-...
Open Graph 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 initial...
X 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 ini...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/2877
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SchemaDiff reports incorrect breakage count","articleBody":"**Describe the bug**\r\nThe `SchemaDiff$CountingReporter` reports a different `breakingCount` compared to the `CapturingReporter.getBreakageCount()`.\r\nI'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\r\n\r\n**To Reproduce**\r\nGiven the following code:\r\n```java\r\nvar capturingReporter = new CapturingReporter();\r\nvar schemaDiff = new SchemaDiff();\r\nvar schema = \u003csome GraphQLSchema\u003e;\r\n\r\nint breakingCount = schemaDiff.diffSchema(DiffSet.diffSet(schema, schema), capturingReporter);\r\n\r\nSystem.out.println(breakingCount + \" != \" + capturingReporter.getBreakageCount());\r\n```\r\nthis will print `1 != 0`\r\n\r\nThis 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.","author":{"url":"https://github.com/NielsDoucet","@type":"Person","name":"NielsDoucet"},"datePublished":"2022-07-01T11:57:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2877/graphql-java/issues/2877"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:558f384b-8606-1282-4fb0-47a1bd5cbe4c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1D4:DC15B:2EB9AC:408854:6A602898 |
| html-safe-nonce | f356fe2536345d896001c3cb1c8ad0d4ce3808eb4a07bb19dde14a1f636dc7f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUQ0OkRDMTVCOjJFQjlBQzo0MDg4NTQ6NkE2MDI4OTgiLCJ2aXNpdG9yX2lkIjoiMjEyNTUzODY1OTI5Njk3NDMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 633c428eb2f3d7036837c6edf25f632b3e1f6b6c0c2219784ded0a542ee508ce |
| hovercard-subject-tag | issue:1291313006 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-java/graphql-java/2877/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bbe66af735bc8ccbe05f907eb73ac38e04fda8c388fcc91938709fb0e3455802/graphql-java/graphql-java/issues/2877 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bbe66af735bc8ccbe05f907eb73ac38e04fda8c388fcc91938709fb0e3455802/graphql-java/graphql-java/issues/2877 |
| og:image:alt | Describe the bug The SchemaDiff$CountingReporter reports a different breakingCount compared to the CapturingReporter.getBreakageCount(). I'm fairly certain its breakingCount field should be initial... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NielsDoucet |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git |
| octolytics-dimension-user_id | 14289921 |
| octolytics-dimension-user_login | graphql-java |
| octolytics-dimension-repository_id | 38602457 |
| octolytics-dimension-repository_nwo | graphql-java/graphql-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38602457 |
| octolytics-dimension-repository_network_root_nwo | graphql-java/graphql-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9824515e740d83d5eb82168a089b806ab0fe04a1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width