mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-10-30 23:47:55 +03:00 
			
		
		
		
	Fixed tests.
This commit is contained in:
		
							parent
							
								
									aa86c27ea2
								
							
						
					
					
						commit
						b72684192f
					
				|  | @ -8,6 +8,9 @@ from .structures import NonNull | ||||||
| from .unmountedtype import UnmountedType | from .unmountedtype import UnmountedType | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | base_type = type | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| def source_resolver(source, root, args, context, info): | def source_resolver(source, root, args, context, info): | ||||||
|     resolved = getattr(root, source, None) |     resolved = getattr(root, source, None) | ||||||
|     if inspect.isfunction(resolved): |     if inspect.isfunction(resolved): | ||||||
|  | @ -30,7 +33,7 @@ class Field(OrderedType): | ||||||
|         ) |         ) | ||||||
|         assert not callable(default_value), ( |         assert not callable(default_value), ( | ||||||
|             'The default value can not be a function but received "{}".' |             'The default value can not be a function but received "{}".' | ||||||
|         ).format(type(default_value)) |         ).format(base_type(default_value)) | ||||||
| 
 | 
 | ||||||
|         if required: |         if required: | ||||||
|             type = NonNull(type) |             type = NonNull(type) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user