【发布时间】:2016-06-06 07:24:58
【问题描述】:
假设我在查询中使用Graphene.Field 定义了一个字段project。现在根据传入的查询,结果可能是单个项目对象或项目对象列表:
class Query(graphene.ObjectType):
project = graphene.Field(Project,..) # Project is a class defined elsewhere
def resolve_project(self, args, info):
# Implementation
如何从我的Flask-graphql 应用程序返回项目列表作为响应?
【问题讨论】:
标签: python graphql flask-graphql