Class: Gitlab::Graphql::Pagination::ExternallyPaginatedArrayConnection

Inherits:
GraphQL::Pagination::ArrayConnection
  • Object
show all
Defined in:
lib/gitlab/graphql/pagination/externally_paginated_array_connection.rb

Instance Method Summary collapse

Instance Method Details

#end_cursorObject


12
13
14
# File 'lib/gitlab/graphql/pagination/externally_paginated_array_connection.rb', line 12

def end_cursor
  items.next_cursor
end

#next_page?Boolean Also known as: has_next_page

Returns:

  • (Boolean)

16
17
18
# File 'lib/gitlab/graphql/pagination/externally_paginated_array_connection.rb', line 16

def next_page?
  end_cursor.present?
end

#previous_page?Boolean Also known as: has_previous_page

Returns:

  • (Boolean)

20
21
22
# File 'lib/gitlab/graphql/pagination/externally_paginated_array_connection.rb', line 20

def previous_page?
  start_cursor.present?
end

#start_cursorObject


8
9
10
# File 'lib/gitlab/graphql/pagination/externally_paginated_array_connection.rb', line 8

def start_cursor
  items.previous_cursor
end