-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
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:
graphql-java/src/main/java/graphql/language/ScalarTypeDefinition.java
Lines 116 to 121 in 021fe1b
| 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=[]}
Metadata
Metadata
Assignees
Labels
No labels