Sha256: e6a1a771ae2e7c2129030f5cd50d7ba5090372e3eadb8d6b417720ff9e34cb05
Contents?: true
Size: 590 Bytes
Versions: 117
Compression:
Stored size: 590 Bytes
Contents
# frozen_string_literal: true module GraphQL class StringEncodingError < GraphQL::RuntimeTypeError attr_reader :string, :field, :path 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 end end
Version data entries
117 entries across 117 versions & 2 rubygems