GeezerVison is showing github.com — DirectivesHolder does not implement toString · Issue #4190 · graphql-java/graphql-java
DirectivesHolder does not implement toString #4190
Description
Describe the bug
#4027 introduced an unannounced breaking change in 25.0. Quite a few places that now contain a DirectivesHolder implicitly call toString on it in their own toString implementations. Before this change that worked just fine, because directives were just a list and lists tend to have reasonable toString implementations.
Here is one example:
|
public String toString() { |
|
return "ScalarTypeDefinition{" + |
|
"name='" + name + '\'' + |
|
", directives=" + directives + |
|
'}'; |
|
} |
DirectivesHolder, however, does not have one, so all those other toString implementations no longer produce reasonable output.
To Reproduce
Create a ScalarTypeDefinition object. Call toString on it.
Actual output:
ScalarTypeDefinition{name='Int', directives=graphql.language.NodeUtil$DirectivesHolder@5c995dee}
Expected output (and actual output in 24.x):
ScalarTypeDefinition{name='Int', directives=[]}
Activity
bbakerman commented on Dec 10, 2025
Since this is open source, perhaps you could put together a PR to help address this.
invliD commented on Dec 10, 2025
I mostly wanted to gauge whether this would be acceptable. I'll contribute a change to fix this early next year, thank you!
github-actions commented on Feb 9, 2026
Hello, this issue has been inactive for 60 days, so we're marking it as stale. If you would like to continue this discussion, please comment within the next 30 days or we'll close the issue.
bbakerman commented on Feb 10, 2026
Reacted by Sebastian Brückner
Metadata
Metadata
Development
No branches or pull requestsIssue actions