2018-11-27 15:10:40 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class MilestoneType < BaseObject
|
|
|
|
graphql_name 'Milestone'
|
|
|
|
|
2019-03-04 02:30:32 +00:00
|
|
|
authorize :read_milestone
|
|
|
|
|
2019-11-04 09:06:21 +00:00
|
|
|
field :id, GraphQL::ID_TYPE, null: false,
|
|
|
|
description: 'ID of the milestone'
|
2019-10-31 12:06:26 +00:00
|
|
|
field :description, GraphQL::STRING_TYPE, null: true,
|
|
|
|
description: 'Description of the milestone'
|
|
|
|
field :title, GraphQL::STRING_TYPE, null: false,
|
|
|
|
description: 'Title of the milestone'
|
|
|
|
field :state, GraphQL::STRING_TYPE, null: false,
|
|
|
|
description: 'State of the milestone'
|
2018-11-27 15:10:40 +00:00
|
|
|
|
2019-10-31 12:06:26 +00:00
|
|
|
field :due_date, Types::TimeType, null: true,
|
|
|
|
description: 'Timestamp of the milestone due date'
|
|
|
|
field :start_date, Types::TimeType, null: true,
|
|
|
|
description: 'Timestamp of the milestone start date'
|
2018-11-27 15:10:40 +00:00
|
|
|
|
2019-10-31 12:06:26 +00:00
|
|
|
field :created_at, Types::TimeType, null: false,
|
|
|
|
description: 'Timestamp of milestone creation'
|
|
|
|
field :updated_at, Types::TimeType, null: false,
|
|
|
|
description: 'Timestamp of last milestone update'
|
2018-11-27 15:10:40 +00:00
|
|
|
end
|
|
|
|
end
|