Class: Recline::ModelReflection

Inherits:
GraphQL::Rails::ActiveReflection::ModelReflection
  • Object
show all
Defined in:
lib/recline/model_reflection.rb

Instance Method Summary collapse

Instance Method Details

#get_attributesObject



6
7
8
9
10
11
12
13
14
# File 'lib/recline/model_reflection.rb', line 6

def get_attributes
  @attributes ||= @type.fields.map { |name, field|
    # No reflection if it's not a model attribute
    property = field.property || name
    if include_property? property
      Recline::AttributeReflection.new(field, @klass, @schema)
    end
  }.compact
end