lib/rails/graphql/request/helpers/value_writers.rb
# Add the item index to the exception message
Add the item index to the exception message
Add the item index to the exception message
def format_array_execption(error, idx)
          real_error = 'The ' + ActiveSupport::Inflector.ordinalize(idx + 1)
          real_error += " value of the #{gql_name} field"
          source_error = "The #{gql_name} field value"
          message = error.message.gsub(source_error, real_error)
          error.define_singleton_method(:message) { message }
        end
def format_array_execption ( error , idx ) real_error = 'The ' + ActiveSupport :: Inflector . ordinalize ( idx + 1 ) real_error += " value of the #{gql_name} field" source_error = "The #{gql_name} field value" message = error . message . gsub ( source_error , real_error ) error . define_singleton_method ( :message ) { message } end
Add the item index to the exception message
Add the item index to the exception message
error
idx