Exception: GraphQL::Client::ResponseErrors
- Includes:
- Enumerable
- Defined in:
- lib/graphql/client.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(definition, errors) ⇒ ResponseErrors
constructor
A new instance of ResponseErrors.
Constructor Details
#initialize(definition, errors) ⇒ ResponseErrors
Returns a new instance of ResponseErrors.
26 27 28 29 30 |
# File 'lib/graphql/client.rb', line 26 def initialize(definition, errors) @request_definition = definition @errors = errors.map { |error| ResponseError.new(definition, error) } super @errors.map(&:message).join(", ") end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
24 25 26 |
# File 'lib/graphql/client.rb', line 24 def errors @errors end |
Instance Method Details
#each(&block) ⇒ Object
32 33 34 |
# File 'lib/graphql/client.rb', line 32 def each(&block) errors.each(&block) end |