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
f3f3c78c
Commit
f3f3c78c
authored
Feb 17, 2021
by
Kassio Borges
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GraphQL: Expose Label `created_at` and `updated_at`
Related to:
https://gitlab.com/gitlab-org/gitlab/-/issues/300005
parent
6ea26ab1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
1 deletion
+67
-1
app/graphql/types/label_type.rb
app/graphql/types/label_type.rb
+4
-0
changelogs/unreleased/kassio-graphql-expose-label-create-at-updated-at.yml
...ased/kassio-graphql-expose-label-create-at-updated-at.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+10
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+36
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+2
-0
spec/graphql/types/label_type_spec.rb
spec/graphql/types/label_type_spec.rb
+10
-1
No files found.
app/graphql/types/label_type.rb
View file @
f3f3c78c
...
...
@@ -19,5 +19,9 @@ module Types
description:
'Background color of the label.'
field
:text_color
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Text color of the label.'
field
:created_at
,
Types
::
TimeType
,
null:
false
,
description:
'When this label was created.'
field
:updated_at
,
Types
::
TimeType
,
null:
false
,
description:
'When this label was last updated.'
end
end
changelogs/unreleased/kassio-graphql-expose-label-create-at-updated-at.yml
0 → 100644
View file @
f3f3c78c
---
title
:
'
GraphQL:
Expose
Label
"created_at"
and
"updated_at"'
merge_request
:
54487
author
:
type
:
changed
doc/api/graphql/reference/gitlab_schema.graphql
View file @
f3f3c78c
...
...
@@ -14870,6 +14870,11 @@ type Label {
"""
color
:
String
!
"""
When
this
label
was
created
.
"""
createdAt
:
Time
!
"""
Description
of
the
label
(
Markdown
rendered
as
HTML
for
caching
)
.
"""
...
...
@@ -14894,6 +14899,11 @@ type Label {
Content
of
the
label
.
"""
title
:
String
!
"""
When
this
label
was
last
updated
.
"""
updatedAt
:
Time
!
}
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
f3f3c78c
...
...
@@ -40617,6 +40617,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "createdAt",
"description": "When this label was created.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "description",
"description": "Description of the label (Markdown rendered as HTML for caching).",
...
...
@@ -40698,6 +40716,24 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "updatedAt",
"description": "When this label was last updated.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
doc/api/graphql/reference/index.md
View file @
f3f3c78c
...
...
@@ -2422,11 +2422,13 @@ Autogenerated return type of JiraImportUsers.
| Field | Type | Description |
| ----- | ---- | ----------- |
|
`color`
| String! | Background color of the label. |
|
`createdAt`
| Time! | When this label was created. |
|
`description`
| String | Description of the label (Markdown rendered as HTML for caching). |
|
`descriptionHtml`
| String | The GitLab Flavored Markdown rendering of
`description`
|
|
`id`
| ID! | Label ID. |
|
`textColor`
| String! | Text color of the label. |
|
`title`
| String! | Content of the label. |
|
`updatedAt`
| Time! | When this label was last updated. |
### LabelCreatePayload
...
...
spec/graphql/types/label_type_spec.rb
View file @
f3f3c78c
...
...
@@ -3,7 +3,16 @@ require 'spec_helper'
RSpec
.
describe
GitlabSchema
.
types
[
'Label'
]
do
it
'has the correct fields'
do
expected_fields
=
[
:id
,
:description
,
:description_html
,
:title
,
:color
,
:text_color
]
expected_fields
=
[
:id
,
:description
,
:description_html
,
:title
,
:color
,
:text_color
,
:created_at
,
:updated_at
]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
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