Exception: GraphQL::Schema::InputObject::ArgumentsAreRequiredError

Inherits:
Error
  • Object
show all
Defined in:
lib/graphql/schema/input_object.rb

Overview

Raised when an InputObject doesn't have any arguments defined and hasn't explicitly opted out of this requirement

Instance Method Summary collapse

Constructor Details

#initialize(input_object_type) ⇒ ArgumentsAreRequiredError

Returns a new instance of ArgumentsAreRequiredError.



15
16
17
18
# File 'lib/graphql/schema/input_object.rb', line 15

def initialize(input_object_type)
  message = "Input Object types must have arguments, but #{input_object_type.graphql_name} doesn't have any. Define an argument for this type, remove it from your schema, or add `has_no_arguments(true)` to its definition."
  super(message)
end