Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b78f6921
Commit
b78f6921
authored
Mar 07, 2022
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary comments
parent
76141b84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
8 deletions
+0
-8
lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb
...ab/graphql/pagination/keyset/generic_keyset_pagination.rb
+0
-8
No files found.
lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb
View file @
b78f6921
...
...
@@ -17,21 +17,13 @@ module Gitlab
strong_memoize
(
:generic_keyset_pagination_has_next_page
)
do
if
before
# If `before` is specified, that points to a specific record,
# even if it's the last one. Since we're asking for `before`,
# then the specific record we're pointing to is in the
# next page
true
elsif
first
case
sliced_nodes
when
Array
sliced_nodes
.
size
>
limit_value
else
# If we count the number of requested items plus one (`limit_value + 1`),
# then if we get `limit_value + 1` then we know there is a next page
sliced_nodes
.
limit
(
1
).
offset
(
limit_value
).
exists?
# replacing relation count
# relation_count(set_limit(sliced_nodes, limit_value + 1)) == limit_value + 1
end
else
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment