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
477021bf
Commit
477021bf
authored
Mar 17, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now use ActiveRecordRelationConnection
for OffsetActiveRecordRelationConnection. Requires graphql-ruby 1.10.x
parent
5d17a264
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
24 deletions
+2
-24
lib/gitlab/graphql/connections.rb
lib/gitlab/graphql/connections.rb
+0
-4
lib/gitlab/graphql/pagination/offset_active_record_relation_connection.rb
...ql/pagination/offset_active_record_relation_connection.rb
+1
-1
lib/gitlab/graphql/pagination/relations/offset_active_record_relation.rb
...hql/pagination/relations/offset_active_record_relation.rb
+0
-12
spec/graphql/gitlab_schema_spec.rb
spec/graphql/gitlab_schema_spec.rb
+0
-6
spec/lib/gitlab/graphql/pagination/offset_active_record_relation_connection_spec.rb
...gination/offset_active_record_relation_connection_spec.rb
+1
-1
No files found.
lib/gitlab/graphql/connections.rb
View file @
477021bf
...
@@ -16,10 +16,6 @@ module Gitlab
...
@@ -16,10 +16,6 @@ module Gitlab
Gitlab
::
Graphql
::
ExternallyPaginatedArray
,
Gitlab
::
Graphql
::
ExternallyPaginatedArray
,
Gitlab
::
Graphql
::
Connections
::
ExternallyPaginatedArrayConnection
Gitlab
::
Graphql
::
Connections
::
ExternallyPaginatedArrayConnection
)
)
GraphQL
::
Relay
::
BaseConnection
.
register_connection_implementation
(
Gitlab
::
Graphql
::
Pagination
::
Relations
::
OffsetActiveRecordRelation
,
Gitlab
::
Graphql
::
Pagination
::
OffsetActiveRecordRelationConnection
)
end
end
end
end
end
end
...
...
lib/gitlab/graphql/pagination/offset_active_record_relation_connection.rb
View file @
477021bf
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
module
Gitlab
module
Gitlab
module
Graphql
module
Graphql
module
Pagination
module
Pagination
class
OffsetActiveRecordRelationConnection
<
GraphQL
::
Relay
::
RelationConnection
class
OffsetActiveRecordRelationConnection
<
GraphQL
::
Pagination
::
ActiveRecord
RelationConnection
end
end
end
end
end
end
...
...
lib/gitlab/graphql/pagination/relations/offset_active_record_relation.rb
deleted
100644 → 0
View file @
5d17a264
# frozen_string_literal: true
module
Gitlab
module
Graphql
module
Pagination
module
Relations
class
OffsetActiveRecordRelation
<
::
ActiveRecord
::
Relation
end
end
end
end
end
spec/graphql/gitlab_schema_spec.rb
View file @
477021bf
...
@@ -52,12 +52,6 @@ describe GitlabSchema do
...
@@ -52,12 +52,6 @@ describe GitlabSchema do
expect
(
connection
).
to
eq
(
Gitlab
::
Graphql
::
Connections
::
FilterableArrayConnection
)
expect
(
connection
).
to
eq
(
Gitlab
::
Graphql
::
Connections
::
FilterableArrayConnection
)
end
end
it
'paginates OffsetActiveRecordRelation using `Pagination::OffsetActiveRecordRelationConnection`'
do
connection
=
implementations
[
Gitlab
::
Graphql
::
Pagination
::
Relations
::
OffsetActiveRecordRelation
.
name
]
expect
(
connection
).
to
eq
(
Gitlab
::
Graphql
::
Pagination
::
OffsetActiveRecordRelationConnection
)
end
describe
'.execute'
do
describe
'.execute'
do
context
'for different types of users'
do
context
'for different types of users'
do
context
'when no context'
do
context
'when no context'
do
...
...
spec/lib/gitlab/graphql/pagination/offset_active_record_relation_connection_spec.rb
View file @
477021bf
...
@@ -4,6 +4,6 @@ require 'spec_helper'
...
@@ -4,6 +4,6 @@ require 'spec_helper'
describe
Gitlab
::
Graphql
::
Pagination
::
OffsetActiveRecordRelationConnection
do
describe
Gitlab
::
Graphql
::
Pagination
::
OffsetActiveRecordRelationConnection
do
it
'subclasses from GraphQL::Relay::RelationConnection'
do
it
'subclasses from GraphQL::Relay::RelationConnection'
do
expect
(
described_class
.
superclass
).
to
eq
GraphQL
::
Relay
::
RelationConnection
expect
(
described_class
.
superclass
).
to
eq
GraphQL
::
Pagination
::
ActiveRecord
RelationConnection
end
end
end
end
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