Class: GraphQL::Client::List

Inherits:
Array
  • Object
show all
Defined in:
lib/graphql/client/list.rb

Overview

Public: Array wrapper for value returned from GraphQL List.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values, errors = Errors.new) ⇒ List

Returns a new instance of List.



8
9
10
11
12
# File 'lib/graphql/client/list.rb', line 8

def initialize(values, errors = Errors.new)
  super(values)
  @errors = errors
  freeze
end

Instance Attribute Details

#errorsObject (readonly)

Public: Return errors associated with list of data.

Returns Errors collection.



17
18
19
# File 'lib/graphql/client/list.rb', line 17

def errors
  @errors
end