Skip to content

Add interface addition event in SchemaDiff #3984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 1, 2025

Conversation

mgadda
Copy link
Contributor

@mgadda mgadda commented May 23, 2025

Summary

Update SchemaDiff.checkImplements to emit ADDITION (info) events for new interfaces. This brings the behavior of SchemaDiff for interfaces into parity with objects, enums, unions, etc with respect to additions.

Details

  • Add a loop to iterate over new interfaces and check if they are present in old interfaces.
  • Emit an ADDITION event if a new interface is not present in the old interfaces.
  • Retain the existing behavior with respect to interface removals.

Testing

Add a new test case in SchemaDiffTest.groovy to verify that checkImplements emits ADDITION events for new interfaces.

mgadda added 4 commits May 19, 2025 17:56
Update `SchemaDiff.checkImplements` to emit ADDITION events for new interfaces.

* Add a loop to iterate over new interfaces and check if they are present in old interfaces.
* Emit an ADDITION event if a new interface is not present in the old interfaces.
* Retain the existing behavior with respect to interface removals.

Add a new test case in `SchemaDiffTest.groovy` to verify that `checkImplements` emits ADDITION events for new interfaces.

* Add a test case to cover scenarios where new interfaces are added and old interfaces are removed.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/mgadda/graphql-java?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this

@bbakerman bbakerman added this to the 25.x breaking changes milestone Jul 1, 2025
@bbakerman bbakerman merged commit 1f92241 into graphql-java:master Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants