Skip to content

Commit a1ecaf4

Browse files
committed
Refactored imap tools
1 parent d22798f commit a1ecaf4

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

graphql/execution/experimental/resolver.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,7 @@
1010
GraphQLUnionType)
1111
from ..base import default_resolve_fn
1212
from ...execution import executor
13-
14-
try:
15-
from itertools import imap
16-
normal_map = map
17-
except:
18-
def normal_map(func, iter):
19-
return list(map(func, iter))
20-
imap = map
21-
13+
from .utils import imap, normal_map
2214

2315
def is_promise(value):
2416
return isinstance(value, Promise)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
try:
2+
from itertools import imap
3+
normal_map = map
4+
except:
5+
def normal_map(func, iter):
6+
return list(map(func, iter))
7+
imap = map

0 commit comments

Comments
 (0)