2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class LabelType < BaseObject
|
|
|
|
graphql_name 'Label'
|
|
|
|
|
2019-07-07 11:18:12 +05:30
|
|
|
authorize :read_label
|
|
|
|
|
2019-12-26 22:10:19 +05:30
|
|
|
field :id, GraphQL::ID_TYPE, null: false,
|
|
|
|
description: 'Label ID'
|
|
|
|
field :description, GraphQL::STRING_TYPE, null: true,
|
2020-01-01 13:55:28 +05:30
|
|
|
description: 'Description of the label (Markdown rendered as HTML for caching)'
|
2019-09-30 21:07:59 +05:30
|
|
|
markdown_field :description_html, null: true
|
2019-12-26 22:10:19 +05:30
|
|
|
field :title, GraphQL::STRING_TYPE, null: false,
|
|
|
|
description: 'Content of the label'
|
|
|
|
field :color, GraphQL::STRING_TYPE, null: false,
|
|
|
|
description: 'Background color of the label'
|
|
|
|
field :text_color, GraphQL::STRING_TYPE, null: false,
|
|
|
|
description: 'Text color of the label'
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
end
|