【发布时间】:2020-02-11 03:45:08
【问题描述】:
我一直在尝试在 Graphql 中使用 parent。希望有人给我他们自己对它的理解以及解析器方法。我还阅读了 docs。
class Person(ObjectType):
# First_name is a field with a resolver that fetches data in our schema
first_name = String()
last_name = String()
def resolve_full_name(parent, info):
return f"{parent.first_name} {parent.last_name}"
【问题讨论】:
标签: python graphql graphene-python