getById: returns a GraphQL friendly throwable instead of TDBMException
gulien opened this issue · 0 comments
gulien commented
Currently, the method getById
of a Dao throws a TDBMException when an error occurs.
It would be better to have a GraphQL friend exception when the entity does not exist for given ID (with a 404 HTTP code).
Example:
/**
* @Query
*/
public function getUserById(User $user): User
{
return $user;
}