Class: GraphQL::Client::PartialResponse

Inherits:
SuccessfulResponse show all
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

Attributes inherited from SuccessfulResponse

#data

Attributes inherited from Response

#extensions

Instance Method Summary collapse

Methods inherited from Response

for

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

#errorsObject (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