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
0f735b74
Commit
0f735b74
authored
Oct 21, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change GraphQL::ID_TYPE to a GlobalIDType
and remove rubocop exception
parent
8c878467
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
.rubocop_todo.yml
.rubocop_todo.yml
+0
-1
app/graphql/resolvers/boards_resolver.rb
app/graphql/resolvers/boards_resolver.rb
+7
-4
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+2
-2
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+2
-2
No files found.
.rubocop_todo.yml
View file @
0f735b74
...
...
@@ -1244,7 +1244,6 @@ Graphql/IDType:
-
'
app/graphql/mutations/snippets/destroy.rb'
-
'
app/graphql/mutations/snippets/mark_as_spam.rb'
-
'
app/graphql/mutations/snippets/update.rb'
-
'
app/graphql/resolvers/boards_resolver.rb'
-
'
app/graphql/resolvers/design_management/design_at_version_resolver.rb'
-
'
app/graphql/resolvers/design_management/design_resolver.rb'
-
'
app/graphql/resolvers/design_management/designs_resolver.rb'
...
...
app/graphql/resolvers/boards_resolver.rb
View file @
0f735b74
...
...
@@ -4,7 +4,7 @@ module Resolvers
class
BoardsResolver
<
BaseResolver
type
Types
::
BoardType
,
null:
true
argument
:id
,
GraphQL
::
ID_TYPE
,
argument
:id
,
::
Types
::
GlobalIDType
[
::
Board
]
,
required:
false
,
description:
'Find a board by its ID'
...
...
@@ -23,10 +23,13 @@ module Resolvers
private
def
extract_board_id
(
g
id
)
return
unless
g
id
.
present?
def
extract_board_id
(
id
)
return
unless
id
.
present?
GitlabSchema
.
parse_gid
(
gid
,
expected_type:
::
Board
).
model_id
# TODO: remove this line when the compatibility layer is removed
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
id
=
Types
::
GlobalIDType
[
Board
].
coerce_isolated_input
(
id
)
id
.
model_id
end
end
end
doc/api/graphql/reference/gitlab_schema.graphql
View file @
0f735b74
...
...
@@ -7746,7 +7746,7 @@ type Group {
"""
Find
a
board
by
its
ID
"""
id
:
ID
id
:
Board
ID
"""
Returns
the
last
_n_
elements
from
the
list
.
...
...
@@ -13733,7 +13733,7 @@ type Project {
"""
Find
a
board
by
its
ID
"""
id
:
ID
id
:
Board
ID
"""
Returns
the
last
_n_
elements
from
the
list
.
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
0f735b74
...
...
@@ -21309,7 +21309,7 @@
"description": "Find a board by its ID",
"type": {
"kind": "SCALAR",
"name": "ID",
"name": "
Board
ID",
"ofType": null
},
"defaultValue": null
...
...
@@ -40291,7 +40291,7 @@
"description": "Find a board by its ID",
"type": {
"kind": "SCALAR",
"name": "ID",
"name": "
Board
ID",
"ofType": null
},
"defaultValue": null
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