Closed
Description
GraphQLPostInvocationInputParser
uses request.getReader().lines().collect(joining())
to read the query string from the request. This effectively removes all line breaks from the request body.
But the query might have used these line breaks as token separator, therefore the resulting query may become invalid.
Example: Given a request body of
{
hero {
name
weight
} }
this will result in a query string {hero {nameweight}}
and fail since there is no such attribute.
I would suggest to use request.getReader().lines().collect(joining(" "))
to read the request body, therefore replacing line breaks with a space.