We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using restassured, sending a graphQL query returns a malformed error. The issue is in SmallRyeGraphQLExecutionHandler. This patter:
PATTERN_NEWLINE_OR_TAB = Pattern.compile("\\n|\\t");
Needs to also remove \r. \r remains in the string and isn't parsed by the JSON parser. Hence malformed.
I stripped before sending to the server to fix. Would be nice if fixed in the code above.
Strip \r in addition to \n and \t
Generates a malformed query exception.
No response
uname -a
ver
windows 11
java -version
22
3.9.2
mvnw --version
gradlew --version
The text was updated successfully, but these errors were encountered:
/cc @jmartisk (graphql), @phillip-kruger (graphql)
Sorry, something went wrong.
Ok, I struggled a bit to reproduce this because I don't have a Windows machine handy, but this seems to reproduce it on Linux:
# create a query that contains LF inside echo -e "{\"query\": \"{__typename\n}\"}" > QUERY_LF # create a query that contains CR+LF inside echo -e "{\"query\": \"{__typename\r\n}\"}" > QUERY_CRLF # execute with LF - works curl -v localhost:8080/graphql --data-binary @QUERY_LF # execute with CR+LF - doesn't work curl -v localhost:8080/graphql --data-binary @QUERY_CRLF
We'll fix this, thanks for reporting.
Successfully merging a pull request may close this issue.
Describe the bug
When using restassured, sending a graphQL query returns a malformed error. The issue is in SmallRyeGraphQLExecutionHandler. This patter:
Needs to also remove \r. \r remains in the string and isn't parsed by the JSON parser. Hence malformed.
I stripped before sending to the server to fix. Would be nice if fixed in the code above.
Expected behavior
Strip \r in addition to \n and \t
Actual behavior
Generates a malformed query exception.
How to Reproduce?
No response
Output of
uname -a
orver
windows 11
Output of
java -version
22
Quarkus version or git rev
3.9.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: