String query = "query {\n" +
" {\n" +
These lines, the issue seems to relies there.
You also don’t need to use the “query” keyword. As you’re not using graphql variables, fragments or something.
Just paste the query as you’ve shared in your last comment that you’ve tested on Ratel UI.
Can you share the results? or a similar idea of what is happening. Also what version are you seeing this?