Exception: Graphiti::Errors::TypeNotFound

Inherits:
Base
  • Object
show all
Defined in:
lib/graphiti/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource, attribute, type) ⇒ TypeNotFound

Returns a new instance of TypeNotFound.



636
637
638
639
640
# File 'lib/graphiti/errors.rb', line 636

def initialize(resource, attribute, type)
  @resource = resource
  @attribute = attribute
  @type = type
end

Instance Method Details

#messageObject



642
643
644
645
646
647
648
# File 'lib/graphiti/errors.rb', line 642

def message
  <<~MSG
    Could not find type #{@type.inspect}! This was specified on attribute #{@attribute.inspect} within resource #{@resource.name}

    Valid types are: #{Graphiti::Types.map.keys.inspect}
  MSG
end