diff --git a/lib/sagittarius/graphql/stable_connection.rb b/lib/sagittarius/graphql/stable_connection.rb index 01f12e7e..99cee586 100644 --- a/lib/sagittarius/graphql/stable_connection.rb +++ b/lib/sagittarius/graphql/stable_connection.rb @@ -46,7 +46,7 @@ def paginate_forward after_id = Integer(decode(@after_value), exception: false) raise GraphQL::ExecutionError, "Invalid cursor '#{@after_value}' provided" if after_id.nil? - @items = @items.where('id > ?', after_id) + @items = @items.where(id: (after_id + 1)..) end def nodes