Hi @StephanHaarmann . I am using graphql for completing a task. Getting some error while using api. Could you please guide what is wrong in the graphql body ?
Hello @soumyaranjansahoo330 ,
the value of the variables fields needs to be an array. Then, the value of a VariableInput is the JSON object you want to transfer here:
In your case, this would look like this:
{
"taskId": "1234354",
"variables": [
{
"name": "comment",
"value": "\"Holiday\""
}
]
}
This will result in your response to be parsed to a valid JSON text node (which was transferred escaped inside a string).
If you use javascript, JSON.stringify
will be your friend.
I hope this helps
Jonathan
1 Like
Thank You @jonathan.lukas .
1 Like