class GraphQL::Searchkick::ResultConnection
Public Instance Methods
has_next_page()
click to toggle source
# File lib/graphql/searchkick/result_connection.rb, line 9 def has_next_page if @has_next_page.nil? @has_next_page = if @before_offset && @before_offset > 0 true elsif first initial_offset = after && offset_from_cursor(after) || 0 nodes.total_count > initial_offset + first else false end end @has_next_page end
load_nodes()
click to toggle source
# File lib/graphql/searchkick/result_connection.rb, line 39 def load_nodes @nodes ||= limited_nodes end
null_relation(relation)
click to toggle source
# File lib/graphql/searchkick/result_connection.rb, line 35 def null_relation(relation) relation.limit(0) end
relation_count(relation)
click to toggle source
# File lib/graphql/searchkick/result_connection.rb, line 23 def relation_count(relation) relation.total_count end
relation_limit(relation)
click to toggle source
# File lib/graphql/searchkick/result_connection.rb, line 27 def relation_limit(relation) relation.limit_value end
relation_offset(relation)
click to toggle source
# File lib/graphql/searchkick/result_connection.rb, line 31 def relation_offset(relation) relation.offset_value end