Commit 98c4e042 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'ps-use-to-s-on-variables-logger-tracer' into 'master'

Use to_s on variables in LoggerTracer

See merge request gitlab-org/gitlab!73671
parents 5a1579f5 779c4701
......@@ -45,14 +45,12 @@ module Gitlab
::Gitlab::GraphqlLogger.info(info)
end
def query_variables_for_logging(query)
clean_variables(query.provided_variables)
end
def clean_variables(variables)
ActiveSupport::ParameterFilter
filtered = ActiveSupport::ParameterFilter
.new(::Rails.application.config.filter_parameters)
.filter(variables)
filtered&.to_s
end
end
end
......
......@@ -44,7 +44,7 @@ RSpec.describe Gitlab::Graphql::Tracers::LoggerTracer do
query_fingerprint: query.fingerprint,
query_string: query_string,
trace_type: "execute_query",
variables: variables
variables: variables.to_s
})
dummy_schema.execute(query_string, variables: variables)
......
......@@ -32,7 +32,7 @@ RSpec.describe 'GraphQL' do
# operation_fingerprint starts with operation name
operation_fingerprint: %r{^anonymous\/},
is_mutation: false,
variables: variables,
variables: variables.to_s,
query_string: query
}
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment