From a73ed432920cd0831b514ae4d8d236d896d36855 Mon Sep 17 00:00:00 2001 From: Ldwg Date: Mon, 12 Dec 2022 03:38:37 +0100 Subject: [PATCH] Fix NameError for subscriptions with customType (#468) --- apischema/graphql/schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apischema/graphql/schema.py b/apischema/graphql/schema.py index 8db75e96..2eb01a5b 100644 --- a/apischema/graphql/schema.py +++ b/apischema/graphql/schema.py @@ -859,11 +859,13 @@ def operation_resolver(operation: Union[Callable, Op], op_class: Type[Op]) -> Re op = operation.function if iscoroutinefunction(op): + @wraps(op) async def wrapper(_, *args, **kwargs): return await op(*args, **kwargs) else: + @wraps(op) def wrapper(_, *args, **kwargs): return op(*args, **kwargs)