使用工具[Graphene-Django](https://github.com/graphl-python/graphene-django)
graphene-django-tools的Python项目详细描述
石墨烯django工具
使用工具^{
只支持python3.7
安装
pip install graphene-django-tools
主要功能
查询
ModelField
ModelConnectionField
ModelFilterConnectionField
将用户模型与过滤器映射为10行。
突变
ModelMutation
ModelCreateMutation
ModelUpdateMutation
示例:^{
用40行的密码验证映射用户模型
重新实现Mutation
类
支持接口上的参数。
classClientMutationID(graphene.Interface):"""Mutation with a client mutation id. """classArguments:client_mutation_id=graphene.String()client_mutation_id=graphene.String()
数据加载器集成
通过将'graphene_django_tools.dataloader.middleware.DataLoaderMiddleware'
添加到django设置中来启用GRAPHENE['MIDDLEWARE']