Method: GraphQL::Client::Errors#each
- Defined in:
- lib/graphql/client/errors.rb
#each ⇒ Object
Public: Iterates through each error key, value pair in the error messages hash. Yields the field and the error for that attribute. If the field has more than one error message, yields once for each error message.
130 131 132 133 134 135 |
# File 'lib/graphql/client/errors.rb', line 130 def each return enum_for(:each) unless block_given? .keys.each do |field| [field].each { |error| yield field, error } end end |