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
18329ea0
Commit
18329ea0
authored
Aug 17, 2021
by
Luke Duncalfe
Committed by
Stan Hu
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rubocop Graphql/Description offenses [RUN AS-IF-FOSS]
parent
5c6f8923
Changes
36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
132 additions
and
166 deletions
+132
-166
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+1
-35
app/graphql/mutations/notes/base.rb
app/graphql/mutations/notes/base.rb
+1
-1
app/graphql/mutations/notes/create/base.rb
app/graphql/mutations/notes/create/base.rb
+2
-2
app/graphql/mutations/notes/create/note.rb
app/graphql/mutations/notes/create/note.rb
+1
-1
app/graphql/mutations/notes/destroy.rb
app/graphql/mutations/notes/destroy.rb
+1
-1
app/graphql/mutations/notes/reposition_image_diff_note.rb
app/graphql/mutations/notes/reposition_image_diff_note.rb
+1
-1
app/graphql/mutations/notes/update/base.rb
app/graphql/mutations/notes/update/base.rb
+1
-1
app/graphql/mutations/notes/update/note.rb
app/graphql/mutations/notes/update/note.rb
+1
-1
app/graphql/mutations/release_asset_links/create.rb
app/graphql/mutations/release_asset_links/create.rb
+1
-1
app/graphql/mutations/release_asset_links/delete.rb
app/graphql/mutations/release_asset_links/delete.rb
+1
-1
app/graphql/mutations/release_asset_links/update.rb
app/graphql/mutations/release_asset_links/update.rb
+2
-2
app/graphql/mutations/releases/create.rb
app/graphql/mutations/releases/create.rb
+4
-4
app/graphql/mutations/releases/delete.rb
app/graphql/mutations/releases/delete.rb
+1
-1
app/graphql/mutations/releases/update.rb
app/graphql/mutations/releases/update.rb
+3
-3
app/graphql/mutations/snippets/base.rb
app/graphql/mutations/snippets/base.rb
+1
-1
app/graphql/mutations/snippets/create.rb
app/graphql/mutations/snippets/create.rb
+4
-4
app/graphql/mutations/snippets/destroy.rb
app/graphql/mutations/snippets/destroy.rb
+1
-1
app/graphql/mutations/snippets/mark_as_spam.rb
app/graphql/mutations/snippets/mark_as_spam.rb
+1
-1
app/graphql/mutations/snippets/update.rb
app/graphql/mutations/snippets/update.rb
+2
-2
app/graphql/mutations/todos/create.rb
app/graphql/mutations/todos/create.rb
+2
-2
app/graphql/mutations/todos/mark_done.rb
app/graphql/mutations/todos/mark_done.rb
+2
-2
app/graphql/mutations/todos/restore.rb
app/graphql/mutations/todos/restore.rb
+2
-2
app/graphql/mutations/todos/restore_many.rb
app/graphql/mutations/todos/restore_many.rb
+1
-1
app/graphql/mutations/user_callouts/create.rb
app/graphql/mutations/user_callouts/create.rb
+2
-2
app/graphql/resolvers/admin/analytics/usage_trends/measurements_resolver.rb
...ers/admin/analytics/usage_trends/measurements_resolver.rb
+1
-1
app/graphql/resolvers/blobs_resolver.rb
app/graphql/resolvers/blobs_resolver.rb
+1
-1
app/graphql/resolvers/board_resolver.rb
app/graphql/resolvers/board_resolver.rb
+1
-1
app/graphql/resolvers/ci/config_resolver.rb
app/graphql/resolvers/ci/config_resolver.rb
+1
-1
app/graphql/resolvers/concerns/resolves_snippets.rb
app/graphql/resolvers/concerns/resolves_snippets.rb
+1
-1
app/graphql/resolvers/design_management/design_at_version_resolver.rb
...resolvers/design_management/design_at_version_resolver.rb
+1
-1
app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
...s/design_management/version/design_at_version_resolver.rb
+3
-3
app/graphql/resolvers/design_management/version_in_collection_resolver.rb
...lvers/design_management/version_in_collection_resolver.rb
+2
-2
app/graphql/resolvers/design_management/version_resolver.rb
app/graphql/resolvers/design_management/version_resolver.rb
+1
-1
app/graphql/resolvers/design_management/versions_resolver.rb
app/graphql/resolvers/design_management/versions_resolver.rb
+2
-2
app/graphql/resolvers/full_path_resolver.rb
app/graphql/resolvers/full_path_resolver.rb
+1
-1
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+78
-78
No files found.
.rubocop_manual_todo.yml
View file @
18329ea0
...
...
@@ -10,7 +10,7 @@
# - guidelines for use found in
# https://docs.gitlab.com/ee/development/contributing/style_guides.html#resolving-rubocop-exceptions.
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/3
22903
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/3
37596
Graphql/Descriptions
:
Exclude
:
-
'
ee/app/graphql/types/iteration_state_enum.rb'
...
...
@@ -23,40 +23,6 @@ Graphql/Descriptions:
-
'
ee/app/graphql/types/vulnerability_severity_enum.rb'
-
'
ee/app/graphql/types/vulnerability_state_enum.rb'
-
'
ee/app/graphql/types/vulnerability_confidence_enum.rb'
-
'
app/graphql/mutations/notes/base.rb'
-
'
app/graphql/mutations/notes/create/base.rb'
-
'
app/graphql/mutations/notes/create/note.rb'
-
'
app/graphql/mutations/notes/destroy.rb'
-
'
app/graphql/mutations/notes/reposition_image_diff_note.rb'
-
'
app/graphql/mutations/notes/update/base.rb'
-
'
app/graphql/mutations/notes/update/note.rb'
-
'
app/graphql/mutations/release_asset_links/create.rb'
-
'
app/graphql/mutations/release_asset_links/delete.rb'
-
'
app/graphql/mutations/release_asset_links/update.rb'
-
'
app/graphql/mutations/releases/create.rb'
-
'
app/graphql/mutations/releases/delete.rb'
-
'
app/graphql/mutations/releases/update.rb'
-
'
app/graphql/mutations/snippets/base.rb'
-
'
app/graphql/mutations/snippets/create.rb'
-
'
app/graphql/mutations/snippets/destroy.rb'
-
'
app/graphql/mutations/snippets/mark_as_spam.rb'
-
'
app/graphql/mutations/snippets/update.rb'
-
'
app/graphql/mutations/todos/create.rb'
-
'
app/graphql/mutations/todos/mark_done.rb'
-
'
app/graphql/mutations/todos/restore.rb'
-
'
app/graphql/mutations/todos/restore_many.rb'
-
'
app/graphql/mutations/user_callouts/create.rb'
-
'
app/graphql/resolvers/admin/analytics/usage_trends/measurements_resolver.rb'
-
'
app/graphql/resolvers/blobs_resolver.rb'
-
'
app/graphql/resolvers/board_resolver.rb'
-
'
app/graphql/resolvers/ci/config_resolver.rb'
-
'
app/graphql/resolvers/concerns/resolves_snippets.rb'
-
'
app/graphql/resolvers/design_management/design_at_version_resolver.rb'
-
'
app/graphql/resolvers/design_management/version/design_at_version_resolver.rb'
-
'
app/graphql/resolvers/design_management/version_in_collection_resolver.rb'
-
'
app/graphql/resolvers/design_management/version_resolver.rb'
-
'
app/graphql/resolvers/design_management/versions_resolver.rb'
-
'
app/graphql/resolvers/full_path_resolver.rb'
-
'
app/graphql/resolvers/labels_resolver.rb'
-
'
app/graphql/resolvers/merge_requests_resolver.rb'
-
'
app/graphql/resolvers/milestones_resolver.rb'
...
...
app/graphql/mutations/notes/base.rb
View file @
18329ea0
...
...
@@ -6,7 +6,7 @@ module Mutations
field
:note
,
Types
::
Notes
::
NoteType
,
null:
true
,
description:
'
The n
ote after mutation.'
description:
'
N
ote after mutation.'
private
...
...
app/graphql/mutations/notes/create/base.rb
View file @
18329ea0
...
...
@@ -11,7 +11,7 @@ module Mutations
argument
:noteable_id
,
::
Types
::
GlobalIDType
[
::
Noteable
],
required:
true
,
description:
'
The g
lobal ID of the resource to add a note to.'
description:
'
G
lobal ID of the resource to add a note to.'
argument
:body
,
GraphQL
::
Types
::
String
,
...
...
@@ -21,7 +21,7 @@ module Mutations
argument
:confidential
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
description:
'
The c
onfidentiality flag of a note. Default is false.'
description:
'
C
onfidentiality flag of a note. Default is false.'
def
resolve
(
args
)
noteable
=
authorized_find!
(
id:
args
[
:noteable_id
])
...
...
app/graphql/mutations/notes/create/note.rb
View file @
18329ea0
...
...
@@ -9,7 +9,7 @@ module Mutations
argument
:discussion_id
,
::
Types
::
GlobalIDType
[
::
Discussion
],
required:
false
,
description:
'
The g
lobal ID of the discussion this note is in reply to.'
description:
'
G
lobal ID of the discussion this note is in reply to.'
private
...
...
app/graphql/mutations/notes/destroy.rb
View file @
18329ea0
...
...
@@ -10,7 +10,7 @@ module Mutations
argument
:id
,
::
Types
::
GlobalIDType
[
::
Note
],
required:
true
,
description:
'
The g
lobal ID of the note to destroy.'
description:
'
G
lobal ID of the note to destroy.'
def
resolve
(
id
:)
note
=
authorized_find!
(
id:
id
)
...
...
app/graphql/mutations/notes/reposition_image_diff_note.rb
View file @
18329ea0
...
...
@@ -16,7 +16,7 @@ module Mutations
loads:
Types
::
Notes
::
NoteType
,
as: :note
,
required:
true
,
description:
'
The g
lobal ID of the DiffNote to update.'
description:
'
G
lobal ID of the DiffNote to update.'
argument
:position
,
Types
::
Notes
::
UpdateDiffImagePositionInputType
,
...
...
app/graphql/mutations/notes/update/base.rb
View file @
18329ea0
...
...
@@ -17,7 +17,7 @@ module Mutations
argument
:id
,
::
Types
::
GlobalIDType
[
::
Note
],
required:
true
,
description:
'
The g
lobal ID of the note to update.'
description:
'
G
lobal ID of the note to update.'
def
resolve
(
args
)
note
=
authorized_find!
(
id:
args
[
:id
])
...
...
app/graphql/mutations/notes/update/note.rb
View file @
18329ea0
...
...
@@ -15,7 +15,7 @@ module Mutations
argument
:confidential
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
description:
'
The c
onfidentiality flag of a note. Default is false.'
description:
'
C
onfidentiality flag of a note. Default is false.'
private
...
...
app/graphql/mutations/release_asset_links/create.rb
View file @
18329ea0
...
...
@@ -22,7 +22,7 @@ module Mutations
field
:link
,
Types
::
ReleaseAssetLinkType
,
null:
true
,
description:
'
The a
sset link after mutation.'
description:
'
A
sset link after mutation.'
def
resolve
(
project_path
:,
tag
:,
**
link_attrs
)
project
=
authorized_find!
(
project_path
)
...
...
app/graphql/mutations/release_asset_links/delete.rb
View file @
18329ea0
...
...
@@ -16,7 +16,7 @@ module Mutations
field
:link
,
Types
::
ReleaseAssetLinkType
,
null:
true
,
description:
'
The d
eleted release asset link.'
description:
'
D
eleted release asset link.'
def
resolve
(
id
:)
link
=
authorized_find!
(
id
)
...
...
app/graphql/mutations/release_asset_links/update.rb
View file @
18329ea0
...
...
@@ -27,12 +27,12 @@ module Mutations
argument
:link_type
,
Types
::
ReleaseAssetLinkTypeEnum
,
required:
false
,
description:
'T
he t
ype of the asset link.'
description:
'Type of the asset link.'
field
:link
,
Types
::
ReleaseAssetLinkType
,
null:
true
,
description:
'
The a
sset link after mutation.'
description:
'
A
sset link after mutation.'
def
ready?
(
**
args
)
if
args
.
key?
(
:link_type
)
&&
args
[
:link_type
].
nil?
...
...
app/graphql/mutations/releases/create.rb
View file @
18329ea0
...
...
@@ -8,7 +8,7 @@ module Mutations
field
:release
,
Types
::
ReleaseType
,
null:
true
,
description:
'
The r
elease after mutation.'
description:
'
R
elease after mutation.'
argument
:tag_name
,
GraphQL
::
Types
::
String
,
required:
true
,
as: :tag
,
...
...
@@ -16,7 +16,7 @@ module Mutations
argument
:ref
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'
The c
ommit SHA or branch name to use if creating a new tag.'
description:
'
C
ommit SHA or branch name to use if creating a new tag.'
argument
:name
,
GraphQL
::
Types
::
String
,
required:
false
,
...
...
@@ -28,11 +28,11 @@ module Mutations
argument
:released_at
,
Types
::
TimeType
,
required:
false
,
description:
'
The date when the release will be/was ready. Defaults to the current
time.'
description:
'
Date and time for the release. Defaults to the current date and
time.'
argument
:milestones
,
[
GraphQL
::
Types
::
String
],
required:
false
,
description:
'T
he t
itle of each milestone the release is associated with. GitLab Premium customers can specify group milestones.'
description:
'Title of each milestone the release is associated with. GitLab Premium customers can specify group milestones.'
argument
:assets
,
Types
::
ReleaseAssetsInputType
,
required:
false
,
...
...
app/graphql/mutations/releases/delete.rb
View file @
18329ea0
...
...
@@ -8,7 +8,7 @@ module Mutations
field
:release
,
Types
::
ReleaseType
,
null:
true
,
description:
'
The d
eleted release.'
description:
'
D
eleted release.'
argument
:tag_name
,
GraphQL
::
Types
::
String
,
required:
true
,
as: :tag
,
...
...
app/graphql/mutations/releases/update.rb
View file @
18329ea0
...
...
@@ -8,7 +8,7 @@ module Mutations
field
:release
,
Types
::
ReleaseType
,
null:
true
,
description:
'
The r
elease after mutation.'
description:
'
R
elease after mutation.'
argument
:tag_name
,
GraphQL
::
Types
::
String
,
required:
true
,
as: :tag
,
...
...
@@ -24,11 +24,11 @@ module Mutations
argument
:released_at
,
Types
::
TimeType
,
required:
false
,
description:
'
The r
elease date.'
description:
'
R
elease date.'
argument
:milestones
,
[
GraphQL
::
Types
::
String
],
required:
false
,
description:
'T
he t
itle of each milestone the release is associated with. GitLab Premium customers can specify group milestones.'
description:
'Title of each milestone the release is associated with. GitLab Premium customers can specify group milestones.'
authorize
:update_release
...
...
app/graphql/mutations/snippets/base.rb
View file @
18329ea0
...
...
@@ -6,7 +6,7 @@ module Mutations
field
:snippet
,
Types
::
SnippetType
,
null:
true
,
description:
'
The s
nippet after mutation.'
description:
'
S
nippet after mutation.'
private
...
...
app/graphql/mutations/snippets/create.rb
View file @
18329ea0
...
...
@@ -14,7 +14,7 @@ module Mutations
field
:snippet
,
Types
::
SnippetType
,
null:
true
,
description:
'
The s
nippet after mutation.'
description:
'
S
nippet after mutation.'
argument
:title
,
GraphQL
::
Types
::
String
,
required:
true
,
...
...
@@ -25,16 +25,16 @@ module Mutations
description:
'Description of the snippet.'
argument
:visibility_level
,
Types
::
VisibilityLevelsEnum
,
description:
'
The v
isibility level of the snippet.'
,
description:
'
V
isibility level of the snippet.'
,
required:
true
argument
:project_path
,
GraphQL
::
Types
::
ID
,
required:
false
,
description:
'
The project full path
the snippet is associated with.'
description:
'
Full path of the project
the snippet is associated with.'
argument
:uploaded_files
,
[
GraphQL
::
Types
::
String
],
required:
false
,
description:
'
The p
aths to files uploaded in the snippet description.'
description:
'
P
aths to files uploaded in the snippet description.'
argument
:blob_actions
,
[
Types
::
Snippets
::
BlobActionInputType
],
description:
'Actions to perform over the snippet repository and blobs.'
,
...
...
app/graphql/mutations/snippets/destroy.rb
View file @
18329ea0
...
...
@@ -9,7 +9,7 @@ module Mutations
argument
:id
,
::
Types
::
GlobalIDType
[
::
Snippet
],
required:
true
,
description:
'
The g
lobal ID of the snippet to destroy.'
description:
'
G
lobal ID of the snippet to destroy.'
def
resolve
(
id
:)
snippet
=
authorized_find!
(
id:
id
)
...
...
app/graphql/mutations/snippets/mark_as_spam.rb
View file @
18329ea0
...
...
@@ -7,7 +7,7 @@ module Mutations
argument
:id
,
::
Types
::
GlobalIDType
[
::
Snippet
],
required:
true
,
description:
'
The g
lobal ID of the snippet to update.'
description:
'
G
lobal ID of the snippet to update.'
def
resolve
(
id
:)
snippet
=
authorized_find!
(
id:
id
)
...
...
app/graphql/mutations/snippets/update.rb
View file @
18329ea0
...
...
@@ -11,7 +11,7 @@ module Mutations
argument
:id
,
::
Types
::
GlobalIDType
[
::
Snippet
],
required:
true
,
description:
'
The g
lobal ID of the snippet to update.'
description:
'
G
lobal ID of the snippet to update.'
argument
:title
,
GraphQL
::
Types
::
String
,
required:
false
,
...
...
@@ -22,7 +22,7 @@ module Mutations
description:
'Description of the snippet.'
argument
:visibility_level
,
Types
::
VisibilityLevelsEnum
,
description:
'
The v
isibility level of the snippet.'
,
description:
'
V
isibility level of the snippet.'
,
required:
false
argument
:blob_actions
,
[
Types
::
Snippets
::
BlobActionInputType
],
...
...
app/graphql/mutations/todos/create.rb
View file @
18329ea0
...
...
@@ -10,11 +10,11 @@ module Mutations
argument
:target_id
,
Types
::
GlobalIDType
[
Todoable
],
required:
true
,
description:
"
The global ID of the to-do item's parent. Issues, merge requests, designs
and epics are supported."
description:
"
Global ID of the to-do item's parent. Issues, merge requests, designs,
and epics are supported."
field
:todo
,
Types
::
TodoType
,
null:
true
,
description:
'T
he t
o-do item created.'
description:
'To-do item created.'
def
resolve
(
target_id
:)
id
=
::
Types
::
GlobalIDType
[
Todoable
].
coerce_isolated_input
(
target_id
)
...
...
app/graphql/mutations/todos/mark_done.rb
View file @
18329ea0
...
...
@@ -10,11 +10,11 @@ module Mutations
argument
:id
,
::
Types
::
GlobalIDType
[
::
Todo
],
required:
true
,
description:
'
The g
lobal ID of the to-do item to mark as done.'
description:
'
G
lobal ID of the to-do item to mark as done.'
field
:todo
,
Types
::
TodoType
,
null:
false
,
description:
'
The r
equested to-do item.'
description:
'
R
equested to-do item.'
def
resolve
(
id
:)
todo
=
authorized_find!
(
id:
id
)
...
...
app/graphql/mutations/todos/restore.rb
View file @
18329ea0
...
...
@@ -10,11 +10,11 @@ module Mutations
argument
:id
,
::
Types
::
GlobalIDType
[
::
Todo
],
required:
true
,
description:
'
The g
lobal ID of the to-do item to restore.'
description:
'
G
lobal ID of the to-do item to restore.'
field
:todo
,
Types
::
TodoType
,
null:
false
,
description:
'
The r
equested to-do item.'
description:
'
R
equested to-do item.'
def
resolve
(
id
:)
todo
=
authorized_find!
(
id:
id
)
...
...
app/graphql/mutations/todos/restore_many.rb
View file @
18329ea0
...
...
@@ -10,7 +10,7 @@ module Mutations
argument
:ids
,
[
::
Types
::
GlobalIDType
[
::
Todo
]],
required:
true
,
description:
'
The g
lobal IDs of the to-do items to restore (a maximum of 50 is supported at once).'
description:
'
G
lobal IDs of the to-do items to restore (a maximum of 50 is supported at once).'
field
:todos
,
[
::
Types
::
TodoType
],
null:
false
,
...
...
app/graphql/mutations/user_callouts/create.rb
View file @
18329ea0
...
...
@@ -8,11 +8,11 @@ module Mutations
argument
:feature_name
,
GraphQL
::
Types
::
String
,
required:
true
,
description:
"
The f
eature name you want to dismiss the callout for."
description:
"
F
eature name you want to dismiss the callout for."
field
:user_callout
,
Types
::
UserCalloutType
,
null:
false
,
description:
'
The u
ser callout dismissed.'
description:
'
U
ser callout dismissed.'
def
resolve
(
feature_name
:)
callout
=
Users
::
DismissUserCalloutService
.
new
(
...
...
app/graphql/resolvers/admin/analytics/usage_trends/measurements_resolver.rb
View file @
18329ea0
...
...
@@ -11,7 +11,7 @@ module Resolvers
argument
:identifier
,
Types
::
Admin
::
Analytics
::
UsageTrends
::
MeasurementIdentifierEnum
,
required:
true
,
description:
'T
he type of measurement/
statistics to retrieve.'
description:
'T
ype of measurement or
statistics to retrieve.'
argument
:recorded_after
,
Types
::
TimeType
,
required:
false
,
...
...
app/graphql/resolvers/blobs_resolver.rb
View file @
18329ea0
...
...
@@ -16,7 +16,7 @@ module Resolvers
argument
:ref
,
GraphQL
::
Types
::
String
,
required:
false
,
default_value:
nil
,
description:
'
The c
ommit ref to get the blobs from. Default value is HEAD.'
description:
'
C
ommit ref to get the blobs from. Default value is HEAD.'
# We fetch blobs from Gitaly efficiently but it still scales O(N) with the
# number of paths being fetched, so apply a scaling limit to that.
...
...
app/graphql/resolvers/board_resolver.rb
View file @
18329ea0
...
...
@@ -8,7 +8,7 @@ module Resolvers
argument
:id
,
::
Types
::
GlobalIDType
[
::
Board
],
required:
true
,
description:
'
The board\'s ID
.'
description:
'
ID of the board
.'
def
resolve
(
id:
nil
)
return
unless
parent
...
...
app/graphql/resolvers/ci/config_resolver.rb
View file @
18329ea0
...
...
@@ -16,7 +16,7 @@ module Resolvers
argument
:project_path
,
GraphQL
::
Types
::
ID
,
required:
true
,
description:
'
The p
roject of the CI config.'
description:
'
P
roject of the CI config.'
argument
:sha
,
GraphQL
::
Types
::
String
,
required:
false
,
...
...
app/graphql/resolvers/concerns/resolves_snippets.rb
View file @
18329ea0
...
...
@@ -13,7 +13,7 @@ module ResolvesSnippets
argument
:visibility
,
Types
::
Snippets
::
VisibilityScopesEnum
,
required:
false
,
description:
'
The v
isibility of the snippet.'
description:
'
V
isibility of the snippet.'
end
def
resolve
(
**
args
)
...
...
app/graphql/resolvers/design_management/design_at_version_resolver.rb
View file @
18329ea0
...
...
@@ -11,7 +11,7 @@ module Resolvers
argument
:id
,
::
Types
::
GlobalIDType
[
::
DesignManagement
::
DesignAtVersion
],
required:
true
,
description:
'
The
Global ID of the design at this version.'
description:
'Global ID of the design at this version.'
def
resolve
(
id
:)
authorized_find!
(
id:
id
)
...
...
app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
View file @
18329ea0
...
...
@@ -19,13 +19,13 @@ module Resolvers
argument
:id
,
DesignAtVersionID
,
required:
false
,
as: :design_at_version_id
,
description:
'
The
ID of the DesignAtVersion.'
description:
'ID of the DesignAtVersion.'
argument
:design_id
,
DesignID
,
required:
false
,
description:
'
The
ID of a specific design.'
description:
'ID of a specific design.'
argument
:filename
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
'
The f
ilename of a specific design.'
description:
'
F
ilename of a specific design.'
def
self
.
single
self
...
...
app/graphql/resolvers/design_management/version_in_collection_resolver.rb
View file @
18329ea0
...
...
@@ -17,11 +17,11 @@ module Resolvers
argument
:sha
,
GraphQL
::
Types
::
String
,
required:
false
,
description:
"
The
SHA256 of a specific version."
description:
"SHA256 of a specific version."
argument
:id
,
VersionID
,
as: :version_id
,
required:
false
,
description:
'
The
Global ID of the version.'
description:
'Global ID of the version.'
def
resolve
(
version_id:
nil
,
sha:
nil
)
# TODO: remove this line when the compatibility layer is removed
...
...
app/graphql/resolvers/design_management/version_resolver.rb
View file @
18329ea0
...
...
@@ -11,7 +11,7 @@ module Resolvers
argument
:id
,
::
Types
::
GlobalIDType
[
::
DesignManagement
::
Version
],
required:
true
,
description:
'
The
Global ID of the version.'
description:
'Global ID of the version.'
def
resolve
(
id
:)
authorized_find!
(
id:
id
)
...
...
app/graphql/resolvers/design_management/versions_resolver.rb
View file @
18329ea0
...
...
@@ -14,12 +14,12 @@ module Resolvers
argument
:earlier_or_equal_to_sha
,
GraphQL
::
Types
::
String
,
as: :sha
,
required:
false
,
description:
'
The
SHA256 of the most recent acceptable version.'
description:
'SHA256 of the most recent acceptable version.'
argument
:earlier_or_equal_to_id
,
VersionID
,
as: :id
,
required:
false
,
description:
'
The
Global ID of the most recent acceptable version.'
description:
'Global ID of the most recent acceptable version.'
# This resolver has a custom singular resolver
def
self
.
single
...
...
app/graphql/resolvers/full_path_resolver.rb
View file @
18329ea0
...
...
@@ -7,7 +7,7 @@ module Resolvers
prepended
do
argument
:full_path
,
GraphQL
::
Types
::
ID
,
required:
true
,
description:
'
The full path of the project, group or namespace, e.g.
, `gitlab-org/gitlab-foss`.'
description:
'
Full path of the project, group, or namespace. For example
, `gitlab-org/gitlab-foss`.'
end
def
model_by_full_path
(
model
,
full_path
)
...
...
doc/api/graphql/reference/index.md
View file @
18329ea0
This diff is collapsed.
Click to expand it.
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