Skip to content

Commit

Permalink
Appease Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
elenatanasoiu committed Feb 16, 2024
1 parent 23c5242 commit 937ea1c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ def attributes_for(key, data)
when 'execute_query'
attrs = {}
attrs['graphql.document'] = data[:query].query_string if data[:query].query_string
# rubocop:disable Style/SafeNavigation - using safe navigation creates more objects, we want to avoid this
attrs['graphql.operation.type'] = data[:query].selected_operation.operation_type if data[:query].selected_operation && data[:query].selected_operation.operation_type
attrs['graphql.operation.name'] = data[:query].selected_operation_name || "anonymous"
# rubocop:enable Style/SafeNavigation
attrs['graphql.operation.name'] = data[:query].selected_operation_name || 'anonymous'
attrs.freeze
else
{}
Expand Down

0 comments on commit 937ea1c

Please sign in to comment.