in src/main/scala/utils/GraphQLRequestBody.scala [11:20]
def parseJsonRequest(content:String):GraphQLRequestBody = {
io.circe.parser.parse(content)
.flatMap(_.as[GraphQLRequestBody]) match {
case Left(err)=>
logger.error(s"Invalid input response: ${err}")
throw new RuntimeException("Invalid input json") //TODO: put in a proper exception type or do error handling better!
case Right(req)=>
req
}
}