Python graphene 模块-InputObjectType() 实例源码

Python graphene 模块,InputObjectType() 实例源码

我们从Python开源项目中,提取了以下1代码示例,用于说明如何使用graphene.InputObjectType()

项目:graphene-django    作者:graphql-python    | 项目源码 | 文件源码
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
    )

相关文章

Python setuptools.dep_util 模块,newer_pairwise_group() ...
Python chainer.utils.type_check 模块,eval() 实例源码 我...
Python chainer.utils.type_check 模块,prod() 实例源码 我...
Python chainer.utils.type_check 模块,expect() 实例源码 ...
Python multiprocessing.managers 模块,BaseProxy() 实例源...
Python multiprocessing.managers 模块,RemoteError() 实例...