I have a mutation query to be passed to aappsync graphql query as shown below which should be passed from Java client code
{
"query": "mutation UpdateUser{setUserInformationAdmin(information: {UserName:\"testUser20SK\",Email:\"testUser20SK@lb.de\",Enabled:true,SecurityHintEnabled:true,Api:\"Default\"})}",
"variables": null,
"operationsName": null
}
The problem here is the input strings should be in the format \"testUser20SK\" when passing to the query.
But when I give the input in the format for example:
queryBuilder.append("{\"query\":\"mutation UpdateUser{setUser(information: {UserName:\""+userInformation.getUserName()+"\"");
it sends the input as UserName:"testUser20SK"
The query is working only when input is passed as UserName:\"testUser20SK\"
Is there a way to pass input in the format UserName:\"testUser20SK\" in Java code instead of UserName:"testUser20SK".
While writing this questipn itself I had struggled because the \ was not displaying properly.