Exception: GraphQL::DateEncodingError

Inherits:
RuntimeTypeError show all
Defined in:
lib/graphql/date_encoding_error.rb

Overview

This error is raised when Types::ISO8601Date is asked to return a value that cannot be parsed to a Ruby Date.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ DateEncodingError

Returns a new instance of DateEncodingError.



11
12
13
14
# File 'lib/graphql/date_encoding_error.rb', line 11

def initialize(value)
  @date_value = value
  super("Date cannot be parsed: #{value}. \nDate must be be able to be parsed as a Ruby Date object.")
end

Instance Attribute Details

#date_valueObject (readonly)

The value which couldn’t be encoded



9
10
11
# File 'lib/graphql/date_encoding_error.rb', line 9

def date_value
  @date_value
end