Skip to content

Commit eb15f03

Browse files
author
Robert Mosolgo
authored
Merge pull request rmosolgo#3009 from rmosolgo/fix-argument-caching
Fix arguments caching - checking for extensions
2 parents 949909a + 895a025 commit eb15f03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/graphql/execution/interpreter/runtime.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,9 @@ def after_lazy(lazy_obj, owner:, field:, path:, scoped_context:, owner_object:,
461461
end
462462

463463
def arguments(graphql_object, arg_owner, ast_node)
464-
# Don't cache arguments if field extras are requested since extras mutate the argument data structure
465-
if arg_owner.arguments_statically_coercible? && (!arg_owner.is_a?(GraphQL::Schema::Field) || arg_owner.extras.empty?)
464+
# Don't cache arguments if field extras or extensions are requested since they can mutate the argument data structure
465+
if arg_owner.arguments_statically_coercible? &&
466+
(!arg_owner.is_a?(GraphQL::Schema::Field) || (arg_owner.extras.empty? && arg_owner.extensions.empty?))
466467
query.arguments_for(ast_node, arg_owner)
467468
else
468469
# The arguments must be prepared in the context of the given object

0 commit comments

Comments
 (0)