From 7b06e01cb31d61727e40dc8d6aeec736e040237d Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 4 Feb 2016 13:47:03 -0800 Subject: [PATCH] Fixed ClassTypes when returned as instance. Fixed #105 --- graphene/core/schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphene/core/schema.py b/graphene/core/schema.py index 78653c14..81ded66c 100644 --- a/graphene/core/schema.py +++ b/graphene/core/schema.py @@ -52,6 +52,8 @@ class Schema(object): def T(self, _type): if not _type: return + if isinstance(_type, ClassType): + _type = type(_type) is_classtype = inspect.isclass(_type) and issubclass(_type, ClassType) is_instancetype = isinstance(_type, InstanceType) if is_classtype or is_instancetype: