Class: GraphQL::Client::FailedResponse
- Defined in:
- lib/graphql/client/response.rb
Overview
Public: A failed response returns no data and at least one error message. Cases may likely be a query validation error, missing authorization, or internal server crash.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Public: Get errors from response.
Attributes inherited from Response
Instance Method Summary collapse
-
#initialize(errors:, **kargs) ⇒ FailedResponse
constructor
Internal: Initialize FailedResponse.
Methods inherited from Response
Constructor Details
#initialize(errors:, **kargs) ⇒ FailedResponse
Internal: Initialize FailedResponse.
93 94 95 96 |
# File 'lib/graphql/client/response.rb', line 93 def initialize(errors:, **kargs) @errors = errors super(**kargs) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Public: Get errors from response.
https://facebook.github.io/graphql/#sec-Errors
Returns ResponseErrors collection object with one or more errors.
90 91 92 |
# File 'lib/graphql/client/response.rb', line 90 def errors @errors end |