I've got a contrived table "Json", which stores json as a string.
id | data
----------------------------
1 | "{ 'foo': 'bar' }"
2 | "{ 'cat': 'dog' }"
I'd like to be able to return it from a graphql query in json form (rather than converting on client end). How do I notate a miscellaneous object type in graphQl?
Something like:
query {
json(id: 1) {
data {
#whatever data is has?
}
}
}
--would return--
{
"data": {
"foo": "bar"
}
}