GraphQL - convert/transform http 200 response to success or error based on underlying data?

Is there any way, I can convert/transform HTTP 200 response to success or error based on underlying data, show appropriate message to the user, and take action?

Failed response example (returned on HTTP 200 status code)
{
“data”: {
“action”: {
“code”: 400,
“success”: false,
“message”: “failed to complete this action”
}
}
}

Hey there @jignesh - good coincidental news: we actually have a PR open for a feature that lets you define custom error messages for GraphQL endpoints. So keep an eye out for this soon :slight_smile: