Skip to content

Commit 8878e5c

Browse files
committed
Fixed promisify dependency
1 parent b10adc4 commit 8878e5c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

graphql/execution/executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55

66
from six import string_types
7-
from promise import Promise, promise_for_dict, promisify, is_thenable
7+
from promise import Promise, promise_for_dict, is_thenable
88

99
from ..error import GraphQLError, GraphQLLocatedError
1010
from ..pyutils.default_ordered_dict import DefaultOrderedDict
@@ -253,7 +253,7 @@ def complete_value(exe_context, return_type, field_asts, info, result):
253253
# If field type is NonNull, complete for inner type, and throw field error if result is null.
254254

255255
if is_thenable(result):
256-
return promisify(result).then(
256+
return Promise.resolve(result).then(
257257
lambda resolved: complete_value(
258258
exe_context,
259259
return_type,

graphql/execution/executors/asyncio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from asyncio import Future, get_event_loop, iscoroutine, wait
44

5-
from promise import promisify
5+
from promise import Promise
66

77
try:
88
from asyncio import ensure_future
@@ -49,5 +49,5 @@ def execute(self, fn, *args, **kwargs):
4949
if isinstance(result, Future) or iscoroutine(result):
5050
future = ensure_future(result, loop=self.loop)
5151
self.futures.append(future)
52-
return promisify(future)
52+
return Promise.resolve(future)
5353
return result

0 commit comments

Comments
 (0)