Sha256: 71e0c4995b5630ce1fe92736b43187ad4474a0669848f3d2c4702792564827da
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
# typed: strict # frozen_string_literal: true module Spoom module Deadcode module Plugins class GraphQL < Base extend T::Sig ignore_classes_inheriting_from( /^(::)?GraphQL::Schema::Enum$/, /^(::)?GraphQL::Schema::Object$/, /^(::)?GraphQL::Schema::Scalar$/, /^(::)?GraphQL::Schema::Union$/, ) ignore_methods_named( "coerce_input", "coerce_result", "graphql_name", "resolve", "resolve_type", "subscribed", "unsubscribed", ) 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) indexer.reference_method(indexer.node_string(arg.value), send.node) send.each_arg_assoc do |key, value| key = indexer.node_string(key).delete_suffix(":") next unless key == "resolver_method" next unless value indexer.reference_method(indexer.symbol_string(value), send.node) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spoom-1.2.4 | lib/spoom/deadcode/plugins/graphql.rb |