class GraphQL::StringEncodingError
Attributes
field[R]
path[R]
string[R]
Public Class Methods
new(str, context:)
click to toggle source
Calls superclass method
# File lib/graphql/string_encoding_error.rb, line 5 def initialize(str, context:) @string = str @field = context[:current_field] @path = context[:current_path] message = "String #{str.inspect} was encoded as #{str.encoding}".dup if @path message << " @ #{@path.join(".")}" end if @field message << " (#{@field.path})" end message << ". GraphQL requires an encoding compatible with UTF-8." super(message) end