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
70f5a5b0
Commit
70f5a5b0
authored
Feb 22, 2020
by
charlieablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GraphQL schema EE concern
Remove constants class from spec_helper
parent
c0749f85
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
app/graphql/gitlab_schema.rb
app/graphql/gitlab_schema.rb
+2
-2
ee/app/graphql/ee/gitlab_schema.rb
ee/app/graphql/ee/gitlab_schema.rb
+11
-0
ee/spec/graphql/epics/aggregate_spec.rb
ee/spec/graphql/epics/aggregate_spec.rb
+4
-1
spec/spec_helper.rb
spec/spec_helper.rb
+0
-4
No files found.
app/graphql/gitlab_schema.rb
View file @
70f5a5b0
...
...
@@ -28,8 +28,6 @@ class GitlabSchema < GraphQL::Schema
default_max_page_size
100
lazy_resolve
::
Epics
::
LazyEpicAggregate
,
:epic_aggregate
class
<<
self
def
multiplex
(
queries
,
**
kwargs
)
kwargs
[
:max_complexity
]
||=
max_query_complexity
(
kwargs
[
:context
])
...
...
@@ -143,3 +141,5 @@ class GitlabSchema < GraphQL::Schema
end
end
end
GitlabSchema
.
prepend_if_ee
(
'EE::GitlabSchema'
)
ee/app/graphql/ee/gitlab_schema.rb
0 → 100644
View file @
70f5a5b0
# frozen_string_literal: true
module
EE
module
GitlabSchema
extend
ActiveSupport
::
Concern
prepended
do
lazy_resolve
::
Epics
::
LazyEpicAggregate
,
:epic_aggregate
end
end
end
ee/spec/graphql/epics/aggregate_spec.rb
View file @
70f5a5b0
# frozen_string_literal: true
describe
Epics
::
Aggregate
do
let
(
:epic_type
)
{
described_class
::
EPIC_TYPE
}
let
(
:issue_type
)
{
described_class
::
ISSUE_TYPE
}
...
...
@@ -13,6 +12,10 @@ describe Epics::Aggregate do
let
(
:weight_sum
)
{
Epics
::
EpicNode
::
WEIGHT_SUM
}
let
(
:count
)
{
Epics
::
EpicNode
::
COUNT
}
class
Constants
include
::
Epics
::
AggregateConstants
end
context
'when CountAggregate'
do
subject
{
Epics
::
CountAggregate
.
new
(
sums
)
}
...
...
spec/spec_helper.rb
View file @
70f5a5b0
...
...
@@ -276,7 +276,3 @@ Rugged::Settings['search_path_global'] = Rails.root.join('tmp/tests').to_s
# Disable timestamp checks for invisible_captcha
InvisibleCaptcha
.
timestamp_enabled
=
false
class
Constants
include
Epics
::
AggregateConstants
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