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
4ed338f6
Commit
4ed338f6
authored
Feb 28, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor MoveTypeEnum into a class
since grpahql 1.10.x no longer supports using `#define`
parent
70c6bb4c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
13 deletions
+28
-13
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+3
-3
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+3
-3
ee/app/graphql/types/epic_tree/epic_tree_node_input_type.rb
ee/app/graphql/types/epic_tree/epic_tree_node_input_type.rb
+0
-7
ee/app/graphql/types/move_type_enum.rb
ee/app/graphql/types/move_type_enum.rb
+11
-0
ee/spec/graphql/types/move_type_enum_spec.rb
ee/spec/graphql/types/move_type_enum_spec.rb
+11
-0
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
4ed338f6
...
@@ -4751,16 +4751,16 @@ enum MilestoneStateEnum {
...
@@ -4751,16 +4751,16 @@ enum MilestoneStateEnum {
}
}
"""
"""
The position t
he adjacent object should be moved.
The position t
o which the adjacent object should be moved
"""
"""
enum
MoveType
{
enum
MoveType
{
"""
"""
The
adjacent
object
will
be
moved
after
the
object
that
is
being
moved
.
The
adjacent
object
will
be
moved
after
the
object
that
is
being
moved
"""
"""
after
after
"""
"""
The
adjacent
object
will
be
moved
before
the
object
that
is
being
moved
.
The
adjacent
object
will
be
moved
before
the
object
that
is
being
moved
"""
"""
before
before
}
}
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
4ed338f6
...
@@ -24316,20 +24316,20 @@
...
@@ -24316,20 +24316,20 @@
{
{
"kind"
:
"ENUM"
,
"kind"
:
"ENUM"
,
"name"
:
"MoveType"
,
"name"
:
"MoveType"
,
"description"
:
"The position t
he adjacent object should be moved.
"
,
"description"
:
"The position t
o which the adjacent object should be moved
"
,
"fields"
:
null
,
"fields"
:
null
,
"inputFields"
:
null
,
"inputFields"
:
null
,
"interfaces"
:
null
,
"interfaces"
:
null
,
"enumValues"
:
[
"enumValues"
:
[
{
{
"name"
:
"before"
,
"name"
:
"before"
,
"description"
:
"The adjacent object will be moved before the object that is being moved
.
"
,
"description"
:
"The adjacent object will be moved before the object that is being moved"
,
"isDeprecated"
:
false
,
"isDeprecated"
:
false
,
"deprecationReason"
:
null
"deprecationReason"
:
null
},
},
{
{
"name"
:
"after"
,
"name"
:
"after"
,
"description"
:
"The adjacent object will be moved after the object that is being moved
.
"
,
"description"
:
"The adjacent object will be moved after the object that is being moved"
,
"isDeprecated"
:
false
,
"isDeprecated"
:
false
,
"deprecationReason"
:
null
"deprecationReason"
:
null
}
}
...
...
ee/app/graphql/types/epic_tree/epic_tree_node_input_type.rb
View file @
4ed338f6
...
@@ -7,13 +7,6 @@ module Types
...
@@ -7,13 +7,6 @@ module Types
graphql_name
'EpicTreeNodeFieldsInputType'
graphql_name
'EpicTreeNodeFieldsInputType'
description
'A node of an epic tree.'
description
'A node of an epic tree.'
MoveTypeEnum
=
GraphQL
::
EnumType
.
define
do
name
'MoveType'
description
'The position the adjacent object should be moved.'
value
(
'before'
,
'The adjacent object will be moved before the object that is being moved.'
)
value
(
'after'
,
'The adjacent object will be moved after the object that is being moved.'
)
end
argument
:id
,
argument
:id
,
GraphQL
::
ID_TYPE
,
GraphQL
::
ID_TYPE
,
required:
true
,
required:
true
,
...
...
ee/app/graphql/types/move_type_enum.rb
0 → 100644
View file @
4ed338f6
# frozen_string_literal: true
module
Types
class
MoveTypeEnum
<
BaseEnum
graphql_name
'MoveType'
description
'The position to which the adjacent object should be moved'
value
'before'
,
'The adjacent object will be moved before the object that is being moved'
value
'after'
,
'The adjacent object will be moved after the object that is being moved'
end
end
ee/spec/graphql/types/move_type_enum_spec.rb
0 → 100644
View file @
4ed338f6
# frozen_string_literal: true
require
'spec_helper'
describe
GitlabSchema
.
types
[
'MoveType'
]
do
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'MoveType'
)
}
it
'exposes all the existing move values'
do
expect
(
described_class
.
values
.
keys
).
to
include
(
*
%w[before after]
)
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