Skip to content

getById: returns a GraphQL friendly throwable instead of TDBMException #6

Description

@gulien

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;
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions