Commit bfa32783 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'kassio/graphql-expose-label-create-at-updated-at' into 'master'

GraphQL: Expose Label `created_at` and `updated_at`

See merge request gitlab-org/gitlab!54487
parents b8d307ac 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
---
title: 'GraphQL: Expose Label "created_at" and "updated_at"'
merge_request: 54487
author:
type: changed
......@@ -14825,6 +14825,11 @@ type Label {
"""
color: String!
"""
When this label was created.
"""
createdAt: Time!
"""
Description of the label (Markdown rendered as HTML for caching).
"""
......@@ -14849,6 +14854,11 @@ type Label {
Content of the label.
"""
title: String!
"""
When this label was last updated.
"""
updatedAt: Time!
}
"""
......
......@@ -40478,6 +40478,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).",
......@@ -40559,6 +40577,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,
......@@ -2414,11 +2414,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