【发布时间】:2020-03-23 18:20:52
【问题描述】:
我希望我的 graphql 查询以字典的形式返回多个值,但我只能在字符串中返回字典。 enter image description here
class Query(ObjectType):
get_reply = String(
question=String(),
sender=String(),
timestamp=String()
)
def resolve_get_reply(root, info, question, sender, timestamp):
written_to_database = False
reply = 'hello'
d = {"reply": reply, "wtd": written_to_database}
return d
现有的指南让我更加困惑。 我如何为这种情况定义架构?
【问题讨论】: