mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-29 21:13:58 +03:00
Added subscription support. Fixed #35
This commit is contained in:
parent
b91ae4b0fb
commit
b1d79c4f07
|
@ -89,6 +89,7 @@ def test_interface_objecttype_init_unexpected():
|
||||||
Human(object())
|
Human(object())
|
||||||
assert str(excinfo.value) == "Human received a non-compatible instance (object) when expecting Article"
|
assert str(excinfo.value) == "Human received a non-compatible instance (object) when expecting Article"
|
||||||
|
|
||||||
|
|
||||||
def test_object_type():
|
def test_object_type():
|
||||||
object_type = schema.T(Human)
|
object_type = schema.T(Human)
|
||||||
Human._meta.fields_map
|
Human._meta.fields_map
|
||||||
|
|
|
@ -79,6 +79,7 @@ class Field(OrderedType):
|
||||||
resolver = getattr(type_objecttype, 'mutate')
|
resolver = getattr(type_objecttype, 'mutate')
|
||||||
else:
|
else:
|
||||||
my_resolver = resolver
|
my_resolver = resolver
|
||||||
|
|
||||||
@wraps(my_resolver)
|
@wraps(my_resolver)
|
||||||
def wrapped_func(instance, args, info):
|
def wrapped_func(instance, args, info):
|
||||||
if not isinstance(instance, self.object_type):
|
if not isinstance(instance, self.object_type):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user