GraphQL Variables are not being parsed
Ethereal82 opened this issue · comments
Currently our work around is to remove the filter for variables and change from asString to toString in GraphQLController (lines 30-35).
Here is the snippet:
val body = json.asObject
.getOrElse(throw new IllegalStateException(s"Invalid json [$json].")).toMap
val query = body("query").as[String].getOrElse("{}")
val variables = body.get("variables")
.map(x => graphQLService.parseVariables(x.toString))
val operation = body.get("operationName").flatMap(_.asString)
Is there a reason for filtering out variables from the body and using asString when setting the variables variable?
Thanks!
Whoops, the filter was left behind from a debugging session. I almost never use variables, so I didn't notice the omission. Thanks for the report, I'll apply your (sensible) change tonight.