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
6a89dfcd
Commit
6a89dfcd
authored
Jan 15, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Note.url GraphQL field
This adds the `url` field to the `Note` type.
parent
cd2ff96f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
0 deletions
+28
-0
app/graphql/types/notes/note_type.rb
app/graphql/types/notes/note_type.rb
+7
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+5
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+14
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-0
spec/graphql/types/notes/note_type_spec.rb
spec/graphql/types/notes/note_type_spec.rb
+1
-0
No files found.
app/graphql/types/notes/note_type.rb
View file @
6a89dfcd
...
...
@@ -46,6 +46,13 @@ module Types
field
:confidential
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Indicates if this note is confidential'
,
method: :confidential?
field
:url
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'URL to view this Note in the Web UI'
def
url
::
Gitlab
::
UrlBuilder
.
build
(
object
)
end
def
system_note_icon_name
SystemNoteHelper
.
system_note_icon_name
(
object
)
if
object
.
system?
...
...
doc/api/graphql/reference/gitlab_schema.graphql
View file @
6a89dfcd
...
...
@@ -16050,6 +16050,11 @@ type Note implements ResolvableInterface {
"""
updatedAt
:
Time
!
"""
URL
to
view
this
Note
in
the
Web
UI
"""
url
:
String
"""
Permissions
for
the
current
user
on
the
resource
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
6a89dfcd
...
...
@@ -47541,6 +47541,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "url",
"description": "URL to view this Note in the Web UI",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "userPermissions",
"description": "Permissions for the current user on the resource",
doc/api/graphql/reference/index.md
View file @
6a89dfcd
...
...
@@ -2430,6 +2430,7 @@ Autogenerated return type of NamespaceIncreaseStorageTemporarily.
|
`system`
| Boolean! | Indicates whether this note was created by the system or by a user |
|
`systemNoteIconName`
| String | Name of the icon corresponding to a system note |
|
`updatedAt`
| Time! | Timestamp of the note's last activity |
|
`url`
| String | URL to view this Note in the Web UI |
|
`userPermissions`
| NotePermissions! | Permissions for the current user on the resource |
### NotePermissions
...
...
spec/graphql/types/notes/note_type_spec.rb
View file @
6a89dfcd
...
...
@@ -22,6 +22,7 @@ RSpec.describe GitlabSchema.types['Note'] do
system_note_icon_name
updated_at
user_permissions
url
]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
...
...
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