Closed
Description
I've created without issues a GraphQLScalar that admits JSON from serde_json
but when using it for queries I get the following error:
{
"error": {
"errors": [
{
"message": "Variable \"$obj\" got invalid value. Expected \"JsonScalar\", found object.",
"locations": [
{
"line": 1,
"column": 8
}
]
}
]
}
}
Query:
query($obj:JsonScalar!){
getAccounts(where: {
properties: {
_eq: $obj
}
}) {
_key
firstName
lastName
}
}
Query variables:
{ "obj": {"a": 1, "b": "c"} }
How can I actually define that JsonScalar is an alias for objects for GraphQL?