From 6f427aac070218601fa6165db803bcd8aff1115c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Pito=C5=84?= Date: Thu, 13 Dec 2018 12:58:46 +0100 Subject: [PATCH] Fix type definition for Resolver --- ariadne/types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ariadne/types.py b/ariadne/types.py index ad3aca4e5..cc751858b 100644 --- a/ariadne/types.py +++ b/ariadne/types.py @@ -9,6 +9,9 @@ def bind_to_schema(self, schema: GraphQLSchema) -> None: pass # pragma: no cover -Resolver = Callable[[Any, GraphQLResolveInfo], Any] +# Note: this should be [Any, GraphQLResolveInfo, **kwargs], +# but this is not achieveable with python types yet: +# https://github.com/python/typing/issues/264 +Resolver = Callable[..., Any] ScalarOperation = Callable[[Any], Any]