mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Fixed promisify
This commit is contained in:
parent
d594a0eca8
commit
bd0d418986
|
@ -5,7 +5,7 @@ from functools import partial
|
|||
import six
|
||||
|
||||
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,
|
||||
Union)
|
||||
|
@ -143,7 +143,7 @@ class IterableConnectionField(Field):
|
|||
|
||||
on_resolve = partial(cls.resolve_connection, connection_type, args)
|
||||
if is_thenable(resolved):
|
||||
return promisify(resolved).then(on_resolve)
|
||||
return Promise.resolve(resolved).then(on_resolve)
|
||||
|
||||
return on_resolve(resolved)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user