Skip to content

Commit 8f9d0ba

Browse files
Update src/graphql/utilities/type_info.py
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
1 parent ce13609 commit 8f9d0ba

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/graphql/utilities/type_info.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,10 @@ def leave(self, node: Node) -> None:
148148

149149
def _get_method(self, direction: str, kind: str) -> Optional[Callable[[], None]]:
150150
key = (direction, kind)
151-
if key in self._visit_fns:
152-
return self._visit_fns[key]
153-
154-
fn = getattr(self, f"{direction}_{kind}", None)
155-
self._visit_fns[key] = fn
156-
return fn
151+
if key not in self._visit_fns:
152+
fn = getattr(self, f"{direction}_{kind}", None)
153+
self._visit_fns[key] = fn
154+
return self._visit_fns[key]
157155

158156

159157
# noinspection PyUnusedLocal

0 commit comments

Comments
 (0)