Class: GraphQL::Modernize::Rules::DefaultMaxPageSize

Inherits:
Base
  • Object
show all
Defined in:
lib/graphql/modernize/rules/schema_config.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



30
31
32
33
34
# File 'lib/graphql/modernize/rules/schema_config.rb', line 30

def on_match(node, _captures)
  return unless inside?(node, :schema)

  add_offense(node.location, message: "Review the split into `default_page_size` and `max_page_size`")
end