Commit b2e7c02d authored by Kassio Borges's avatar Kassio Borges Committed by Mike Jang

Expose Board `createdAt` and `updatedAt` in GraphQL

parent bf208a35
...@@ -20,6 +20,12 @@ module Types ...@@ -20,6 +20,12 @@ module Types
field :hide_closed_list, type: GraphQL::BOOLEAN_TYPE, null: true, field :hide_closed_list, type: GraphQL::BOOLEAN_TYPE, null: true,
description: 'Whether or not closed list is hidden.' description: 'Whether or not closed list is hidden.'
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of when the board was created.'
field :updated_at, Types::TimeType, null: false,
description: 'Timestamp of when the board was last updated.'
field :lists, field :lists,
Types::BoardListType.connection_type, Types::BoardListType.connection_type,
null: true, null: true,
......
---
title: Expose createdAt and updatedAt fields for Board in the GraphQL API
merge_request: 57645
author:
type: changed
...@@ -799,6 +799,7 @@ Represents a project or group issue board. ...@@ -799,6 +799,7 @@ Represents a project or group issue board.
| Field | Type | Description | | Field | Type | Description |
| ----- | ---- | ----------- | | ----- | ---- | ----------- |
| `assignee` | [`User`](#user) | The board assignee. | | `assignee` | [`User`](#user) | The board assignee. |
| `createdAt` | [`Time!`](#time) | Timestamp of when the board was created. |
| `epics` | [`BoardEpicConnection`](#boardepicconnection) | Epics associated with board issues. | | `epics` | [`BoardEpicConnection`](#boardepicconnection) | Epics associated with board issues. |
| `hideBacklogList` | [`Boolean`](#boolean) | Whether or not backlog list is hidden. | | `hideBacklogList` | [`Boolean`](#boolean) | Whether or not backlog list is hidden. |
| `hideClosedList` | [`Boolean`](#boolean) | Whether or not closed list is hidden. | | `hideClosedList` | [`Boolean`](#boolean) | Whether or not closed list is hidden. |
...@@ -808,6 +809,7 @@ Represents a project or group issue board. ...@@ -808,6 +809,7 @@ Represents a project or group issue board.
| `lists` | [`BoardListConnection`](#boardlistconnection) | Lists of the board. | | `lists` | [`BoardListConnection`](#boardlistconnection) | Lists of the board. |
| `milestone` | [`Milestone`](#milestone) | The board milestone. | | `milestone` | [`Milestone`](#milestone) | The board milestone. |
| `name` | [`String`](#string) | Name of the board. | | `name` | [`String`](#string) | Name of the board. |
| `updatedAt` | [`Time!`](#time) | Timestamp of when the board was last updated. |
| `webPath` | [`String!`](#string) | Web path of the board. | | `webPath` | [`String!`](#string) | Web path of the board. |
| `webUrl` | [`String!`](#string) | Web URL of the board. | | `webUrl` | [`String!`](#string) | Web URL of the board. |
| `weight` | [`Int`](#int) | Weight of the board. | | `weight` | [`Int`](#int) | Weight of the board. |
......
...@@ -8,8 +8,18 @@ RSpec.describe GitlabSchema.types['Board'] do ...@@ -8,8 +8,18 @@ RSpec.describe GitlabSchema.types['Board'] do
specify { expect(described_class).to require_graphql_authorizations(:read_issue_board) } specify { expect(described_class).to require_graphql_authorizations(:read_issue_board) }
it 'has specific fields' do it 'has specific fields' do
expected_fields = %w[id name web_url web_path] expected_fields = %w[
id
name
hideBacklogList
hideClosedList
createdAt
updatedAt
lists
webPath
webUrl
]
expect(described_class).to include_graphql_fields(*expected_fields) expect(described_class).to have_graphql_fields(*expected_fields).at_least
end end
end 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