class GraphQL::Client::Response
Public: Abstract base class for GraphQL
responses.
https://facebook.github.io/graphql/#sec-Response-Format
Attributes
data[R]
Public: Wrapped ObjectType of data returned from the server.
https://facebook.github.io/graphql/#sec-Data
Returns instance of ObjectType subclass.
errors[R]
Public: Get partial failures from response.
https://facebook.github.io/graphql/#sec-Errors
Returns Errors
collection object with zero or more errors.
extensions[R]
Public: Hash of server specific extension metadata.
original_hash[R]
Public: Original JSON response hash returned from server.
Returns Hash.
to_h[R]
Public: Original JSON response hash returned from server.
Returns Hash.
Public Class Methods
new(hash, data: nil, errors: Errors.new, extensions: {})
click to toggle source
Internal: Initialize base class.
# File lib/graphql/client/response.rb, line 34 def initialize(hash, data: nil, errors: Errors.new, extensions: {}) @original_hash = hash @data = data @errors = errors @extensions = extensions end