2020-01-07 16:07:50 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Graphql
|
|
|
|
class ExternallyPaginatedArray < Array
|
2020-12-13 22:10:06 -05:00
|
|
|
attr_reader :start_cursor, :end_cursor
|
2020-01-07 16:07:50 -05:00
|
|
|
|
|
|
|
def initialize(previous_cursor, next_cursor, *args)
|
|
|
|
super(args)
|
2020-12-13 22:10:06 -05:00
|
|
|
@start_cursor = previous_cursor
|
|
|
|
@end_cursor = next_cursor
|
2020-01-07 16:07:50 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|