Commit 7b1c31d1 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Move epic field in GraphQL IssueType

Fixes broken master in gitlab-foss
parent 601e7e78
......@@ -49,7 +49,6 @@ module Types
field :web_url, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :relative_position, GraphQL::INT_TYPE, null: true # rubocop:disable Graphql/Descriptions
field :epic, ::Types::EpicType, null: true, description: 'The epic to which issue belongs'
field :participants, Types::UserType.connection_type, null: true, complexity: 5, description: 'List of participants for the issue'
field :time_estimate, GraphQL::INT_TYPE, null: false, description: 'The time estimate on the issue'
field :total_time_spent, GraphQL::INT_TYPE, null: false, description: 'Total time reported as spent on the issue'
......
......@@ -6,6 +6,8 @@ module EE
extend ActiveSupport::Concern
prepended do
field :epic, ::Types::EpicType, null: true, description: 'The epic to which issue belongs'
field :weight, GraphQL::INT_TYPE, # rubocop:disable Graphql/Descriptions
null: true,
resolve: -> (obj, _args, _ctx) { obj.supports_weight? ? obj.weight : nil }
......
......@@ -3,6 +3,8 @@
require 'spec_helper'
describe GitlabSchema.types['Issue'] do
it { expect(described_class).to have_graphql_field(:epic) }
it { expect(described_class).to have_graphql_field(:weight) }
it { expect(described_class).to have_graphql_field(:designs) }
......
......@@ -10,7 +10,7 @@ describe GitlabSchema.types['Issue'] do
it { expect(described_class.interfaces).to include(Types::Notes::NoteableType.to_graphql) }
it 'has specific fields' do
fields = %i[iid title description state reference author assignees participants labels epic milestone due_date
fields = %i[iid title description state reference author assignees participants labels milestone due_date
confidential discussion_locked upvotes downvotes user_notes_count web_path web_url relative_position
time_estimate total_time_spent closed_at created_at updated_at task_completion_status]
......
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