mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-10-30 23:47:55 +03:00 
			
		
		
		
	docs: add get_human function (#1380)
Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									99f0103e37
								
							
						
					
					
						commit
						74db349da4
					
				|  | @ -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