mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-11-04 18:07:48 +03:00 
			
		
		
		
	Fixed promisify
This commit is contained in:
		
							parent
							
								
									d594a0eca8
								
							
						
					
					
						commit
						bd0d418986
					
				| 
						 | 
					@ -5,7 +5,7 @@ from functools import partial
 | 
				
			||||||
import six
 | 
					import six
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from graphql_relay import connection_from_list
 | 
					from graphql_relay import connection_from_list
 | 
				
			||||||
from promise import is_thenable, promisify
 | 
					from promise import Promise, is_thenable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from ..types import (AbstractType, Boolean, Enum, Int, Interface, List, NonNull, Scalar, String,
 | 
					from ..types import (AbstractType, Boolean, Enum, Int, Interface, List, NonNull, Scalar, String,
 | 
				
			||||||
                     Union)
 | 
					                     Union)
 | 
				
			||||||
| 
						 | 
					@ -143,7 +143,7 @@ class IterableConnectionField(Field):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        on_resolve = partial(cls.resolve_connection, connection_type, args)
 | 
					        on_resolve = partial(cls.resolve_connection, connection_type, args)
 | 
				
			||||||
        if is_thenable(resolved):
 | 
					        if is_thenable(resolved):
 | 
				
			||||||
            return promisify(resolved).then(on_resolve)
 | 
					            return Promise.resolve(resolved).then(on_resolve)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return on_resolve(resolved)
 | 
					        return on_resolve(resolved)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user