For graphql variables, data from the Grid, get serialize in to a string instead of json
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2023
03:46 AM
03-18-2023
03:46 AM
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.
Labels:
- Labels:
-
Data-Driven Testing
0 REPLIES 0
