In GraphQL, there are circumstances where you may have a large number of derived classes and you want to output the variance as a raw JSON object. I might, for example want to output a mixed bag of Shape objects, each of which is described in a different format, or having a varying number of points/lines/curves.
case class Shape(name: String, points: JsValue)
At present, GraphQL cannot output such an object as:Can't find suitable GraphQL output type for Option[play.api.libs.json.JsValue]
It seems like this should be easy to do since JsValue is an "already-marshalled" object.
Any suggestions on how to implement?