Skip to content

Commit c25bcb3

Browse files
committed
Move NonNull check
1 parent 38baf7a commit c25bcb3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphene/relay/connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ def type(self):
115115

116116
@classmethod
117117
def resolve_connection(cls, connection_type, args, resolved):
118-
if isinstance(connection_type, NonNull):
119-
connection_type = connection_type.of_type
120-
121118
if isinstance(resolved, connection_type):
122119
return resolved
123120

@@ -139,6 +136,9 @@ def resolve_connection(cls, connection_type, args, resolved):
139136
def connection_resolver(cls, resolver, connection_type, root, info, **args):
140137
resolved = resolver(root, info, **args)
141138

139+
if isinstance(connection_type, NonNull):
140+
connection_type = connection_type.of_type
141+
142142
on_resolve = partial(cls.resolve_connection, connection_type, args)
143143
if is_thenable(resolved):
144144
return Promise.resolve(resolved).then(on_resolve)

0 commit comments

Comments
 (0)