Exception: GraphQL::Schema::Object::FieldsAreRequiredError
- Defined in:
- lib/graphql/schema/object.rb
Overview
Raised when an Object doesn't have any field defined and hasn't explicitly opted out of this requirement
Instance Method Summary collapse
-
#initialize(object_type) ⇒ FieldsAreRequiredError
constructor
A new instance of FieldsAreRequiredError.
Constructor Details
#initialize(object_type) ⇒ FieldsAreRequiredError
Returns a new instance of FieldsAreRequiredError.
13 14 15 16 |
# File 'lib/graphql/schema/object.rb', line 13 def initialize(object_type) = "Object types must have fields, but #{object_type.graphql_name} doesn't have any. Define a field for this type, remove it from your schema, or add `has_no_fields(true)` to its definition." super() end |