lib/graphql/relay/array_connection.rb in graphql-0.18.0 vs lib/graphql/relay/array_connection.rb in graphql-0.18.1

- old
+ new

@@ -16,11 +16,11 @@ private # apply first / last limit results def paged_nodes - @paged_nodes = begin + @paged_nodes ||= begin items = sliced_nodes if limit items.first(limit) else @@ -29,13 +29,10 @@ end end # Apply cursors to edges def sliced_nodes - @sliced_nodes ||= begin - items = object - items[starting_offset..-1] - end + @sliced_nodes ||= nodes[starting_offset..-1] end def index_from_cursor(cursor) Base64.decode64(cursor).to_i end