I attempted to use response transformation in Hasura to extract the response_body from an action response. However, the action response is structured as follows
1.
{
"action_name": {
response_body
}
}
My desired outcome is to obtain the response_body without the action_name key, like this:
2.
{
response_body
}
Using response transform {{$body}} you get the 1.
When I attempt to access {{$body.action_name}} in the response transformation, it results in an error, as described below:
{
"code": "unexpected",
"error": "Response Transformation Failed",
"internal": [
{
"error_code": "Attribute Error",
"message": "'Object' has no attritubte 'action_name'.",
"source_position": {
"end_column": 17,
"end_line": 0,
"start_column": 1,
"start_line": 0
}
}
],
"path": "$"
}
New contributor