lib/spoom/deadcode/plugins/graphql.rb in spoom-1.3.2 vs lib/spoom/deadcode/plugins/graphql.rb in spoom-1.3.3

- old
+ new

@@ -6,14 +6,14 @@ module Plugins class GraphQL < Base extend T::Sig ignore_classes_inheriting_from( - /^(::)?GraphQL::Schema::Enum$/, - /^(::)?GraphQL::Schema::Object$/, - /^(::)?GraphQL::Schema::Scalar$/, - /^(::)?GraphQL::Schema::Union$/, + "GraphQL::Schema::Enum", + "GraphQL::Schema::Object", + "GraphQL::Schema::Scalar", + "GraphQL::Schema::Union", ) ignore_methods_named( "coerce_input", "coerce_result", @@ -22,24 +22,24 @@ "resolve_type", "subscribed", "unsubscribed", ) - sig { override.params(indexer: Indexer, send: Send).void } - def on_send(indexer, send) + sig { override.params(send: Send).void } + def on_send(send) return unless send.recv.nil? && send.name == "field" arg = send.args.first return unless arg.is_a?(Prism::SymbolNode) - indexer.reference_method(arg.unescaped, send.node) + @index.reference_method(arg.unescaped, send.location) send.each_arg_assoc do |key, value| key = key.slice.delete_suffix(":") next unless key == "resolver_method" next unless value - indexer.reference_method(value.slice.delete_prefix(":"), send.node) + @index.reference_method(value.slice.delete_prefix(":"), send.location) end end end end end