Skip to content

Fix AstPrinter trimming blank string values - #2672

Merged
bbakerman merged 1 commit into
graphql-java:masterfrom
gnawf:fix-ast-printer-string-trim
Jan 11, 2022
Merged

Fix AstPrinter trimming blank string values#2672
bbakerman merged 1 commit into
graphql-java:masterfrom
gnawf:fix-ast-printer-string-trim

Conversation

@gnawf

@gnawf gnawf commented Jan 11, 2022

Copy link
Copy Markdown
Contributor

Let me know if we should add any other tests.

return valueOf(((FloatValue) value).getValue());
} else if (value instanceof StringValue) {
return wrap("\"", escapeJsonString(((StringValue) value).getValue()), "\"");
return "\"" + escapeJsonString(((StringValue) value).getValue()) + "\"";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Decided to just switch to plain old concat instead of using the wrap method.

@bbakerman bbakerman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice

@bbakerman bbakerman added this to the 18.0 milestone Jan 11, 2022
@bbakerman
bbakerman merged commit 2d522ed into graphql-java:master Jan 11, 2022
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