Class: GraphQL::Modernize::Rules::QueryArgumentsConstant

Inherits:
Base
  • Object
show all
Defined in:
lib/graphql/modernize/rules/legacy.rb

Instance Attribute Summary

Attributes inherited from Base

#offenses

Instance Method Summary collapse

Methods inherited from Base

#initialize, node_pattern, node_types, rule, #visit

Constructor Details

This class inherits a constructor from GraphQL::Modernize::Rules::Base

Instance Method Details

#on_match(node, _captures) ⇒ Object



183
184
185
186
187
# File 'lib/graphql/modernize/rules/legacy.rb', line 183

def on_match(node, _captures)
  return unless constant_source(node) == "GraphQL::Query::Arguments"

  add_offense(node.location, message: "Migrate this use of `GraphQL::Query::Arguments` manually")
end