File: list.rb

package info (click to toggle)
ruby-graphql-client 0.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 252 kB
  • sloc: ruby: 1,878; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 452 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true
require "graphql/client/errors"

module GraphQL
  class Client
    # Public: Array wrapper for value returned from GraphQL List.
    class List < Array
      def initialize(values, errors = Errors.new)
        super(values)
        @errors = errors
        freeze
      end

      # Public: Return errors associated with list of data.
      #
      # Returns Errors collection.
      attr_reader :errors
    end
  end
end