Commit efd4184d authored by Kushal Pandya's avatar Kushal Pandya

Expose `titleHtml` & `descriptionHtml` in Epic

- Expose `titleHtml` & `descriptionHtml` props on Epic
- Move shared Epic fragment to `ee/`
parent 73dbd818
...@@ -863,6 +863,7 @@ Represents an epic on an issue board. ...@@ -863,6 +863,7 @@ Represents an epic on an issue board.
| `descendantCounts` | [`EpicDescendantCount`](#epicdescendantcount) | Number of open and closed descendant epics and issues. | | `descendantCounts` | [`EpicDescendantCount`](#epicdescendantcount) | Number of open and closed descendant epics and issues. |
| `descendantWeightSum` | [`EpicDescendantWeights`](#epicdescendantweights) | Total weight of open and closed issues in the epic and its descendants. | | `descendantWeightSum` | [`EpicDescendantWeights`](#epicdescendantweights) | Total weight of open and closed issues in the epic and its descendants. |
| `description` | [`String`](#string) | Description of the epic. | | `description` | [`String`](#string) | Description of the epic. |
| `descriptionHtml` | [`String`](#string) | The GitLab Flavored Markdown rendering of `description`. |
| `discussions` | [`DiscussionConnection!`](#discussionconnection) | All discussions on this noteable. | | `discussions` | [`DiscussionConnection!`](#discussionconnection) | All discussions on this noteable. |
| `downvotes` | [`Int!`](#int) | Number of downvotes the epic has received. | | `downvotes` | [`Int!`](#int) | Number of downvotes the epic has received. |
| `dueDate` | [`Time`](#time) | Due date of the epic. | | `dueDate` | [`Time`](#time) | Due date of the epic. |
...@@ -892,6 +893,7 @@ Represents an epic on an issue board. ...@@ -892,6 +893,7 @@ Represents an epic on an issue board.
| `state` | [`EpicState!`](#epicstate) | State of the epic. | | `state` | [`EpicState!`](#epicstate) | State of the epic. |
| `subscribed` | [`Boolean!`](#boolean) | Indicates the currently logged in user is subscribed to the epic. | | `subscribed` | [`Boolean!`](#boolean) | Indicates the currently logged in user is subscribed to the epic. |
| `title` | [`String`](#string) | Title of the epic. | | `title` | [`String`](#string) | Title of the epic. |
| `titleHtml` | [`String`](#string) | The GitLab Flavored Markdown rendering of `title`. |
| `updatedAt` | [`Time`](#time) | Timestamp of when the epic was updated. | | `updatedAt` | [`Time`](#time) | Timestamp of when the epic was updated. |
| `upvotes` | [`Int!`](#int) | Number of upvotes the epic has received. | | `upvotes` | [`Int!`](#int) | Number of upvotes the epic has received. |
| `userDiscussionsCount` | [`Int!`](#int) | Number of user discussions in the epic. | | `userDiscussionsCount` | [`Int!`](#int) | Number of user discussions in the epic. |
...@@ -2662,6 +2664,7 @@ Represents an epic. ...@@ -2662,6 +2664,7 @@ Represents an epic.
| `descendantCounts` | [`EpicDescendantCount`](#epicdescendantcount) | Number of open and closed descendant epics and issues. | | `descendantCounts` | [`EpicDescendantCount`](#epicdescendantcount) | Number of open and closed descendant epics and issues. |
| `descendantWeightSum` | [`EpicDescendantWeights`](#epicdescendantweights) | Total weight of open and closed issues in the epic and its descendants. | | `descendantWeightSum` | [`EpicDescendantWeights`](#epicdescendantweights) | Total weight of open and closed issues in the epic and its descendants. |
| `description` | [`String`](#string) | Description of the epic. | | `description` | [`String`](#string) | Description of the epic. |
| `descriptionHtml` | [`String`](#string) | The GitLab Flavored Markdown rendering of `description`. |
| `discussions` | [`DiscussionConnection!`](#discussionconnection) | All discussions on this noteable. | | `discussions` | [`DiscussionConnection!`](#discussionconnection) | All discussions on this noteable. |
| `downvotes` | [`Int!`](#int) | Number of downvotes the epic has received. | | `downvotes` | [`Int!`](#int) | Number of downvotes the epic has received. |
| `dueDate` | [`Time`](#time) | Due date of the epic. | | `dueDate` | [`Time`](#time) | Due date of the epic. |
...@@ -2691,6 +2694,7 @@ Represents an epic. ...@@ -2691,6 +2694,7 @@ Represents an epic.
| `state` | [`EpicState!`](#epicstate) | State of the epic. | | `state` | [`EpicState!`](#epicstate) | State of the epic. |
| `subscribed` | [`Boolean!`](#boolean) | Indicates the currently logged in user is subscribed to the epic. | | `subscribed` | [`Boolean!`](#boolean) | Indicates the currently logged in user is subscribed to the epic. |
| `title` | [`String`](#string) | Title of the epic. | | `title` | [`String`](#string) | Title of the epic. |
| `titleHtml` | [`String`](#string) | The GitLab Flavored Markdown rendering of `title`. |
| `updatedAt` | [`Time`](#time) | Timestamp of when the epic was updated. | | `updatedAt` | [`Time`](#time) | Timestamp of when the epic was updated. |
| `upvotes` | [`Int!`](#int) | Number of upvotes the epic has received. | | `upvotes` | [`Int!`](#int) | Number of upvotes the epic has received. |
| `userDiscussionsCount` | [`Int!`](#int) | Number of user discussions in the epic. | | `userDiscussionsCount` | [`Int!`](#int) | Number of user discussions in the epic. |
......
#import "~/graphql_shared/fragments/epic.fragment.graphql" #import "ee/graphql_shared/fragments/epic.fragment.graphql"
query Epic($fullPath: ID!, $iid: ID!) { query Epic($fullPath: ID!, $iid: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
epic(iid: $iid) { epic(iid: $iid) {
......
#import "~/graphql_shared/fragments/epic.fragment.graphql" #import "ee/graphql_shared/fragments/epic.fragment.graphql"
mutation issueSetEpic($input: IssueSetEpicInput!) { mutation issueSetEpic($input: IssueSetEpicInput!) {
issueSetEpic(input: $input) { issueSetEpic(input: $input) {
......
#import "~/graphql_shared/fragments/epic.fragment.graphql" #import "ee/graphql_shared/fragments/epic.fragment.graphql"
#import "~/graphql_shared/fragments/label.fragment.graphql" #import "~/graphql_shared/fragments/label.fragment.graphql"
query ListEpics( query ListEpics(
......
...@@ -23,8 +23,10 @@ module Types ...@@ -23,8 +23,10 @@ module Types
description: 'Internal ID of the epic.' description: 'Internal ID of the epic.'
field :title, GraphQL::STRING_TYPE, null: true, field :title, GraphQL::STRING_TYPE, null: true,
description: 'Title of the epic.' description: 'Title of the epic.'
markdown_field :title_html, null: true
field :description, GraphQL::STRING_TYPE, null: true, field :description, GraphQL::STRING_TYPE, null: true,
description: 'Description of the epic.' description: 'Description of the epic.'
markdown_field :description_html, null: true
field :state, EpicStateEnum, null: false, field :state, EpicStateEnum, null: false,
description: 'State of the epic.' description: 'State of the epic.'
field :confidential, GraphQL::BOOLEAN_TYPE, null: true, field :confidential, GraphQL::BOOLEAN_TYPE, null: true,
......
---
title: Expose 'titleHtml' & 'descriptionHtml' in Epic type
merge_request: 58990
author:
type: added
...@@ -5,11 +5,11 @@ require 'spec_helper' ...@@ -5,11 +5,11 @@ require 'spec_helper'
RSpec.describe GitlabSchema.types['Epic'] do RSpec.describe GitlabSchema.types['Epic'] do
let(:fields) do let(:fields) do
%i[ %i[
id iid title description confidential state group parent author labels id iid title titleHtml description descriptionHtml confidential state group
start_date start_date_is_fixed start_date_fixed start_date_from_milestones parent author labels start_date start_date_is_fixed start_date_fixed
due_date due_date_is_fixed due_date_fixed due_date_from_milestones start_date_from_milestones due_date due_date_is_fixed due_date_fixed
closed_at created_at updated_at children has_children has_issues has_parent due_date_from_milestones closed_at created_at updated_at children has_children
web_path web_url relation_path reference issues user_permissions has_issues has_parent web_path web_url relation_path reference issues user_permissions
notes discussions relative_position subscribed participants notes discussions relative_position subscribed participants
descendant_counts descendant_weight_sum upvotes downvotes descendant_counts descendant_weight_sum upvotes downvotes
user_notes_count user_discussions_count health_status current_user_todos user_notes_count user_discussions_count health_status current_user_todos
......
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