Exception: GraphQL::Client::ResponseErrors
- Includes:
- Enumerable
- Defined in:
- lib/graphql/client/response.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.
76 77 78 79 80 |
# File 'lib/graphql/client/response.rb', line 76 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.
74 75 76 |
# File 'lib/graphql/client/response.rb', line 74 def errors @errors end |
Instance Method Details
#each(&block) ⇒ Object
82 83 84 |
# File 'lib/graphql/client/response.rb', line 82 def each(&block) errors.each(&block) end |