Exception: Graphiti::Errors::ImplicitFilterTypeMissing

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

Instance Method Summary collapse

Constructor Details

#initialize(resource_class, name) ⇒ ImplicitFilterTypeMissing

Returns a new instance of ImplicitFilterTypeMissing.



478
479
480
481
# File 'lib/graphiti/errors.rb', line 478

def initialize(resource_class, name)
  @resource_class = resource_class
  @name = name
end

Instance Method Details

#messageObject



483
484
485
486
487
488
489
490
491
492
493
# File 'lib/graphiti/errors.rb', line 483

def message
  <<~MSG
    Tried to add filter-only attribute #{@name.inspect}, but type was missing!

    If you are adding a filter that does not have a corresponding attribute, you must pass a type:

    filter :name, :string do <--- like this
      # ... code ...
    end
  MSG
end