Skip to content

Commit

Permalink
Improved get_argument_values speed
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jul 10, 2018
1 parent 9059ecd commit 6154aa3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions graphql/execution/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,12 @@ def get_field_resolver(self, field_resolver):
def get_argument_values(self, field_def, field_ast):
# type: (GraphQLField, Field) -> Dict[str, Any]
k = field_def, field_ast
result = self.argument_values_cache.get(k)
if not result:
result = self.argument_values_cache[k] = get_argument_values(
if k not in self.argument_values_cache:
self.argument_values_cache[k] = get_argument_values(
field_def.args, field_ast.arguments, self.variable_values
)

return result
return self.argument_values_cache[k]

def report_error(self, error, traceback=None):
# type: (Exception, Optional[TracebackType]) -> None
Expand Down

0 comments on commit 6154aa3

Please sign in to comment.