summaryrefslogtreecommitdiff
path: root/lib/gitlab/graphql/externally_paginated_array.rb
blob: 4797fe15cd3b823c1d12665096f13a766c9a1084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Gitlab
  module Graphql
    class ExternallyPaginatedArray < Array
      attr_reader :previous_cursor, :next_cursor

      def initialize(previous_cursor, next_cursor, *args)
        super(args)
        @previous_cursor = previous_cursor
        @next_cursor = next_cursor
      end
    end
  end
end