Skip to content

Commit

Permalink
Fix active record error model deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsgroen committed Oct 10, 2024
1 parent ab81fc5 commit d583fed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/graphql/util/error_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
module Util
class ErrorBuilder
def self.build_errors(context, errors)
errors.map do |attr, message|
message = "#{attr}: #{message}"
context.add_error(GraphQL::ExecutionError.new(message, extensions: { code: 'INPUT_ERROR', attribute: attr }))
errors.each do |error|
message = "#{error.attribute}: #{error.message}"
context.add_error(GraphQL::ExecutionError.new(message, extensions: { code: 'INPUT_ERROR', attribute: error.attribute }))
end
return
end
Expand Down

0 comments on commit d583fed

Please sign in to comment.