tgkp
2 years agoEstablished Member
For graphql variables, data from the Grid, get serialize in to a string instead of json
Hi,
I am facing an issue while passing variables to a graphql query. Variables are getting values from a Grid.
But, while API call, both the variables get converted as string instead of json.
"variables" : "{\n \"name\" : \"abc\",\n \"age\" : 42\n}"
Getting error:
"message" : "`variables` in a POST body should be provided as an object, not a recursively JSON-encoded string.",
query variable used:
{
"name" : "${getNameAgeFromGrid#name}",
"age" : ${getNameAgeFromGrid#age}
}
Below variables options are working:
{
"name" : "${getNameAgeFromGrid#name}",
"age" : 42
}
and:
{
"name" : "abc",
"age" : 42
}
Is there any solution for this issue.