mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-18 12:02:19 +03:00
docs: add get_human function
This commit is contained in:
parent
0a54094f59
commit
33caa9c10c
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user