Class: GraphQL::Client::PartialResponse
- Inherits:
-
SuccessfulResponse
- Object
- Response
- SuccessfulResponse
- GraphQL::Client::PartialResponse
- Defined in:
- lib/graphql/client/response.rb
Overview
Public: A partial response means the query executed with some errors but returned all non-nullable fields. PartialResponse is still considered a SuccessfulResponse as it returns data and the client may still proceed with its normal render flow.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Public: Get partial failures from response.
Attributes inherited from SuccessfulResponse
Attributes inherited from Response
Instance Method Summary collapse
-
#initialize(errors:, **kargs) ⇒ PartialResponse
constructor
Internal: Initialize PartialResponse.
Methods inherited from Response
Constructor Details
#initialize(errors:, **kargs) ⇒ PartialResponse
Internal: Initialize PartialResponse.
75 76 77 78 |
# File 'lib/graphql/client/response.rb', line 75 def initialize(errors:, **kargs) @errors = errors super(**kargs) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Public: Get partial failures from response.
https://facebook.github.io/graphql/#sec-Errors
Returns ResponseErrors collection object with zero or more errors.
72 73 74 |
# File 'lib/graphql/client/response.rb', line 72 def errors @errors end |