This was my original question (moved from Slack as requested):
I have a function:
mutation CreateNewRanking {
createNewRanking(
active: true
rankingname: "Test 6"
rankingdesc: "t6"
rankingowneraddr: "0x267be913fc79bbecb3c3ec88332a537d1c593a6i"
)
}
that successfully adds a new document to the db. However, in Playground I get the following error message:
{
"data": null,
"errors": [
{
"message": "Can't convert '{ref: ref(id = \"274973443428975110\", class = ref(id = \"Ranking\", class = ref(id = \"classes\"))), ts: 1598493960820000, data: {active: true, rankingname: \"Test 6\", rankingdesc: \"t6\", rankingowneraddr: \"0x267be913fc79bbecb3c3ec88332a537d1c593a6i\"}}' to String",
"path": [
"createNewRanking"
],
"locations": [
{
"line": 2,
"column": 3
}
]
}
]
}
How do I fix this? thanks …
The answer was:
You are expecting String! but your resolver UDF function is returning a json object with fields ref, ts, data{…}
Follow on question:
I am expecting String! because I originally followed the tutorial here:
Presumably I need then to change the resolver UDF function’s configuration so that it returns
String!
(?) … if so, how do I do that? thanks …