Module: Rails::GraphQL::Helpers::WithSchemaFields::ClassMethods
- Defined in:
- lib/rails/graphql/helpers/with_schema_fields.rb
Instance Method Summary collapse
Instance Method Details
#inherited(subclass) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/rails/graphql/helpers/with_schema_fields.rb', line 17 def inherited(subclass) super if defined? super TYPE_FIELD_CLASS.each_key do |type| fields = instance_variable_defined?("@#{type}_fields") fields = fields ? instance_variable_get("@#{type}_fields") : EMPTY_HASH fields.each_value { |field| subclass.add_proxy_field(type, field) } end end |