docs: add get_human function (#1380)

Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
This commit is contained in:
Naoya Yamashita 2023-07-19 16:01:00 +09:00 committed by GitHub
parent 99f0103e37
commit 74db349da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,10 @@ If we have a schema with Person type and one field on the root query.
from graphene import ObjectType, String, Field
def get_human(name):
first_name, last_name = name.split()
return Person(first_name, last_name)
class Person(ObjectType):
full_name = String()