mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-23 01:56:54 +03:00
Reuse objecttype fields
This commit is contained in:
parent
1956c1fb03
commit
ae667f3915
|
@ -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),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user