Commit f3f3c78c authored by Kassio Borges's avatar Kassio Borges

GraphQL: Expose Label `created_at` and `updated_at`

Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/300005
parent 6ea26ab1
......@@ -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
---
title: 'GraphQL: Expose Label "created_at" and "updated_at"'
merge_request: 54487
author:
type: changed
......@@ -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!
}
"""
......
......@@ -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,
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment