I have a query as below:
query {
countries {code , name , phone , currency }
}
that I want to format as below because I'm using Java to call the query:
{\"query\":\"query { \\r\\n \\r\\n countries {code , name , phone , currency
}\\r\\n\\r\\n\\r\\n}\" ,\"variables\":{} }
The variables is a part needed for GraphQL.
How could I do this dynamically? Could regex solve this?
