Reuse objecttype fields

This commit is contained in:
Syrus Akbary 2015-11-12 23:18:17 -08:00
parent 1956c1fb03
commit ae667f3915

View File

@ -244,10 +244,8 @@ class InputObjectType(ObjectType):
@classmethod @classmethod
def internal_type(cls, schema): def internal_type(cls, schema):
fields = lambda: OrderedDict([(f.name, schema.T(f))
for f in cls._meta.fields])
return GraphQLInputObjectType( return GraphQLInputObjectType(
cls._meta.type_name, cls._meta.type_name,
description=cls._meta.description, description=cls._meta.description,
fields=fields, fields=partial(cls.get_fields, schema),
) )