diff --git a/graphene/types/schema.py b/graphene/types/schema.py index 4921aa3e..928e179e 100644 --- a/graphene/types/schema.py +++ b/graphene/types/schema.py @@ -320,7 +320,9 @@ class TypeMap(dict): field_type, args=args, resolve=field.get_resolver( - self.get_resolver(graphene_type, name, field.default_value) + self.get_query_resolver( + graphene_type, name, field.default_value + ) ), subscribe=field.get_resolver( self.get_subscribe_resolver( @@ -353,7 +355,7 @@ class TypeMap(dict): return wrapped_resolver - def get_resolver(self, graphene_type, name, default_value): + def get_query_resolver(self, graphene_type, name, default_value): if not issubclass(graphene_type, ObjectType): return diff --git a/tests_asyncio/test_subscribe.py b/tests_asyncio/test_subscribe.py index 2fd3fdb8..8d2d79b1 100644 --- a/tests_asyncio/test_subscribe.py +++ b/tests_asyncio/test_subscribe.py @@ -1,9 +1,7 @@ -from datetime import datetime from pytest import mark -from graphene import ObjectType, Int, String, Schema, DateTime +from graphene import ObjectType, Int, String, Schema from graphene.types.objecttype import ObjectTypeOptions -from graphene.utils.get_unbound_function import get_unbound_function MYPY = False