Improved objecttype typemap duplication

This commit is contained in:
Syrus Akbary 2016-09-17 12:05:05 -07:00
parent 061c33f8d6
commit aa84d6d8db

View File

@ -119,6 +119,9 @@ class TypeMap(GraphQLTypeMap):
def construct_objecttype(self, map, type): def construct_objecttype(self, map, type):
from .definitions import GrapheneObjectType from .definitions import GrapheneObjectType
if type._meta.name in map: if type._meta.name in map:
_type = map[type._meta.name]
if is_graphene_type(_type):
assert _type.graphene_type == type
return map return map
map[type._meta.name] = GrapheneObjectType( map[type._meta.name] = GrapheneObjectType(
graphene_type=type, graphene_type=type,