From b1d79c4f070fe72715d4b16562d95dd685d2b264 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 19 Nov 2015 08:37:15 -0800 Subject: [PATCH] Added subscription support. Fixed #35 --- graphene/contrib/django/tests/test_types.py | 1 + graphene/core/types/field.py | 1 + 2 files changed, 2 insertions(+) diff --git a/graphene/contrib/django/tests/test_types.py b/graphene/contrib/django/tests/test_types.py index 66be7f3c..0e8eaa11 100644 --- a/graphene/contrib/django/tests/test_types.py +++ b/graphene/contrib/django/tests/test_types.py @@ -89,6 +89,7 @@ def test_interface_objecttype_init_unexpected(): Human(object()) assert str(excinfo.value) == "Human received a non-compatible instance (object) when expecting Article" + def test_object_type(): object_type = schema.T(Human) Human._meta.fields_map diff --git a/graphene/core/types/field.py b/graphene/core/types/field.py index 58700ad3..53187391 100644 --- a/graphene/core/types/field.py +++ b/graphene/core/types/field.py @@ -79,6 +79,7 @@ class Field(OrderedType): resolver = getattr(type_objecttype, 'mutate') else: my_resolver = resolver + @wraps(my_resolver) def wrapped_func(instance, args, info): if not isinstance(instance, self.object_type):