mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-29 13:03:56 +03:00
Improved objecttype typemap duplication
This commit is contained in:
parent
061c33f8d6
commit
aa84d6d8db
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user