lib/spoom/deadcode/plugins/graphql.rb in spoom-1.2.4 vs lib/spoom/deadcode/plugins/graphql.rb in spoom-1.3.0
- old
+ new
@@ -27,19 +27,19 @@
sig { override.params(indexer: Indexer, send: Send).void }
def on_send(indexer, send)
return unless send.recv.nil? && send.name == "field"
arg = send.args.first
- return unless arg.is_a?(SyntaxTree::SymbolLiteral)
+ return unless arg.is_a?(Prism::SymbolNode)
- indexer.reference_method(indexer.node_string(arg.value), send.node)
+ indexer.reference_method(arg.unescaped, send.node)
send.each_arg_assoc do |key, value|
- key = indexer.node_string(key).delete_suffix(":")
+ key = key.slice.delete_suffix(":")
next unless key == "resolver_method"
next unless value
- indexer.reference_method(indexer.symbol_string(value), send.node)
+ indexer.reference_method(value.slice.delete_prefix(":"), send.node)
end
end
end
end
end