我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用graphene.InputObjectType()。
def convert_serializer_to_input_type(serializer_class): serializer = serializer_class() items = { name: convert_serializer_field(field) for name, field in serializer.fields.items() } return type( '{}Input'.format(serializer.__class__.__name__), (graphene.InputObjectType,), items )