Commit 0f54a8b4 authored by Kev's avatar Kev Committed by Doug Stull

Fix GraphQL/FieldDefinitions offense (Part 2/4)

- See merge request gitlab-org/gitlab!76015

Changelog: other
parent 30878001
......@@ -5,9 +5,6 @@ GraphQL/FieldDefinitions:
- app/graphql/types/group_type.rb
- app/graphql/types/issue_type.rb
- app/graphql/types/label_type.rb
- app/graphql/types/merge_request_type.rb
- app/graphql/types/namespace_type.rb
- app/graphql/types/notes/note_type.rb
- app/graphql/types/project_type.rb
- app/graphql/types/projects/topic_type.rb
- app/graphql/types/release_type.rb
......
......@@ -21,10 +21,8 @@ module Types
description: 'Internal ID of the merge request.'
field :title, GraphQL::Types::String, null: false,
description: 'Title of the merge request.'
markdown_field :title_html, null: true
field :description, GraphQL::Types::String, null: true,
description: 'Description of the merge request (Markdown rendered as HTML for caching).'
markdown_field :description_html, null: true
field :state, MergeRequestStateEnum, null: false,
description: 'State of the merge request.'
field :created_at, Types::TimeType, null: false,
......@@ -202,6 +200,9 @@ module Types
field :timelogs, Types::TimelogType.connection_type, null: false,
description: 'Timelogs on the merge request.'
markdown_field :title_html, null: true
markdown_field :description_html, null: true
def approved_by
object.approved_by_users
end
......
......@@ -20,7 +20,6 @@ module Types
field :description, GraphQL::Types::String, null: true,
description: 'Description of the namespace.'
markdown_field :description_html, null: true
field :visibility, GraphQL::Types::String, null: true,
description: 'Visibility of the namespace.'
......@@ -47,6 +46,8 @@ module Types
null: true,
description: "Shared runners availability for the namespace and its descendants."
markdown_field :description_html, null: true
def root_storage_statistics
Gitlab::Graphql::Loaders::BatchRootStorageStatisticsLoader.new(object.id).find
end
......
......@@ -33,8 +33,6 @@ module Types
method: :note,
description: 'Content of the note.'
markdown_field :body_html, null: true, method: :note
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of the note creation.'
field :updated_at, Types::TimeType, null: false,
......@@ -50,6 +48,8 @@ module Types
null: true,
description: 'URL to view this Note in the Web UI.'
markdown_field :body_html, null: true, method: :note
def url
::Gitlab::UrlBuilder.build(object)
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