application.resolvers package#

Subpackages#

Submodules#

application.resolvers.decorators module#

application.resolvers.decorators

application.resolvers.decorators.handle_client_exceptions(func)#

Decorator that handles client-specific exceptions and returns error details to the client without crashing the application.

This decorator captures exceptions of type ClientError that occur within the decorated function and returns a structured error response containing the exception type and message.

Parameters:

func (Callable) – The function to be wrapped by the decorator.

Returns:

A wrapped function that handles ClientError exceptions.

Return type:

Callable

application.resolvers.decorators.typed(func)#

Decorator that automatically injects the ‘__typename’ field when returning dicts that don’t already have the field, based on function type hints.

Note that this decorator must be the first in any decorator chain, that is there may not be any decorators between this and the actual function.

Parameters:

func (Callable) – The function to be wrapped by the decorator.

Returns:

A wrapped function that injects the __typename field into the result.

Return type:

Callable

Module contents#

application.resolvers