From ccc869ffe87b7974336163b2f87171f872418f20 Mon Sep 17 00:00:00 2001 From: Ldwg Date: Tue, 13 Sep 2022 10:11:17 +0200 Subject: [PATCH] Fix NameError for subscriptions with customType --- apischema/graphql/schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apischema/graphql/schema.py b/apischema/graphql/schema.py index 276a75b2..5ca314ad 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)