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
0e825e45
Commit
0e825e45
authored
Aug 06, 2020
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Offset rather than Keyset pagination
parent
cc1dcae0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/graphql/resolvers/board_list_issues_resolver.rb
app/graphql/resolvers/board_list_issues_resolver.rb
+1
-1
app/graphql/types/issuable_connection_type.rb
app/graphql/types/issuable_connection_type.rb
+1
-1
No files found.
app/graphql/resolvers/board_list_issues_resolver.rb
View file @
0e825e45
...
@@ -9,7 +9,7 @@ module Resolvers
...
@@ -9,7 +9,7 @@ module Resolvers
def
resolve
(
**
args
)
def
resolve
(
**
args
)
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
service
=
Boards
::
Issues
::
ListService
.
new
(
list
.
board
.
resource_parent
,
context
[
:current_user
],
{
board_id:
list
.
board
.
id
,
id:
list
.
id
})
service
=
Boards
::
Issues
::
ListService
.
new
(
list
.
board
.
resource_parent
,
context
[
:current_user
],
{
board_id:
list
.
board
.
id
,
id:
list
.
id
})
service
.
execute
.
reorder
(
"issues.relative_position ASC"
).
order
(
"issues.id DESC"
)
Gitlab
::
Graphql
::
Pagination
::
OffsetActiveRecordRelationConnection
.
new
(
service
.
execute
)
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
end
end
end
end
...
...
app/graphql/types/issuable_connection_type.rb
View file @
0e825e45
...
@@ -7,7 +7,7 @@ module Types
...
@@ -7,7 +7,7 @@ module Types
description:
'Total count of collection'
description:
'Total count of collection'
def
count
def
count
relation
=
object
.
items
relation
=
object
.
items
.
reorder
(
nil
)
if
relation
.
try
(
:group_values
)
&
.
present?
if
relation
.
try
(
:group_values
)
&
.
present?
relation
.
size
.
keys
.
size
relation
.
size
.
keys
.
size
...
...
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