Skip to content

Commit

Permalink
Simplify graphql argument value fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
y9v committed Sep 5, 2024
1 parent d51cc17 commit d620229
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/datadog/appsec/contrib/graphql/gateway/multiplex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ def argument_value(argument, query_variables)
when ::GraphQL::Language::Nodes::VariableIdentifier
# we need to pass query.variables here instead of query.provided_variables,
# since #provided_variables don't know anything about variable default value
var_name = argument.value.name
query_variables.fetch(var_name) if query_variables.key?(var_name)
query_variables[argument.value.name]
when ::GraphQL::Language::Nodes::InputObject
arguments_hash(argument.value.arguments, query_variables)
else
Expand Down

0 comments on commit d620229

Please sign in to comment.