{{ message }}
Fix schema transformation and Field Visibility for complex deletion cases#4209
Merged
Fix schema transformation and Field Visibility for complex deletion cases#4209
Conversation
Contributor
Change GraphQLSchema.additionalTypes from Set<GraphQLType> to Set<GraphQLNamedType> for improved type safety. All types that can be added as additional types are named types, so this makes the API more precise.
bbakerman
reviewed
Jan 19, 2026
| * @see Builder#additionalTypes(Set) | ||
| */ | ||
| public Set<GraphQLType> getAdditionalTypes() { | ||
| public Set<GraphQLNamedType> getAdditionalTypes() { |
Member
There was a problem hiding this comment.
This is a breaking change. Just in case you didnt realise.
bbakerman
reviewed
Jan 19, 2026
| public Builder additionalTypes(Set<? extends GraphQLNamedType> additionalTypes) { | ||
| this.additionalTypes.addAll(additionalTypes); | ||
| return this; | ||
| } |
bbakerman
reviewed
Jan 19, 2026
| public Builder additionalType(GraphQLNamedType additionalType) { | ||
| this.additionalTypes.add(additionalType); | ||
| return this; | ||
| } |
Member
There was a problem hiding this comment.
and again - thats ok - just pointing it out
Member
Author
There was a problem hiding this comment.
Well .. they never contained not named types so far. Technically breaking, but I think nobody ever used it to add [Foo] instead of Foo
bbakerman
approved these changes
Jan 19, 2026
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

For certain complex schema deletion cases the current schema transformer fails.
This PR introduces a new transform method
transformSchemaWithDeleteswhich should be used specifically for these cases.The FieldVisibilityTransformer is also changed internally to use this new method.
The existing schema transformation was unchanged to keep existing behavior as the new
transformSchemaWithDeleteschanges slightly the traversal behavior.The original bug was first reported in #4133, but we had additional reports after.