Exception: GraphQL::Schema::Enum::MissingValuesError

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

Overview

Raised when a GraphQL::Schema::Enum is defined to have no values. This can also happen when all values return false for .visible?.

Instance Method Summary collapse

Constructor Details

#initialize(enum_type) ⇒ MissingValuesError

Returns a new instance of MissingValuesError.



52
53
54
55
# File 'lib/graphql/schema/enum.rb', line 52

def initialize(enum_type)
  @enum_type = enum_type
  super("Enum types require at least one value, but #{enum_type.graphql_name} didn't provide any for this query. Make sure at least one value is defined and visible for this query.")
end