I have notification table , where data field stored as json :
{"data":{"description":"Event Status has been changed to pending","event_id":19}}
I get this error
"errors": [
{
"debugMessage": "Expected a value of type \"String\" but received: {\"data\":{\"description\":\"Event Status has been changed to pending\",\"event_id\":19}}",
I have tried to add the following on notifications model:
public function getDataAttribute($data)
{
return json_decode($data, true);
}
But no solution.
I tried to use [String]
in GraphQL schema but nothing.