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

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

Instance Method Summary collapse

Methods included from ConnectionRedaction

#nodes

Instance Method Details

#next_page?Boolean Also known as: has_next_page

Returns:

  • (Boolean)


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

def next_page?
  items.try(:has_next_page).nil? ? end_cursor.present? : items.has_next_page
end

#previous_page?Boolean Also known as: has_previous_page

Returns:

  • (Boolean)


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

def previous_page?
  items.try(:has_previous_page).nil? ? start_cursor.present? : items.has_previous_page
end