diff options
Diffstat (limited to 'app/graphql/types/time_tracking/timelog_category_type.rb')
-rw-r--r-- | app/graphql/types/time_tracking/timelog_category_type.rb | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/app/graphql/types/time_tracking/timelog_category_type.rb b/app/graphql/types/time_tracking/timelog_category_type.rb new file mode 100644 index 00000000000..c73a6fbd43b --- /dev/null +++ b/app/graphql/types/time_tracking/timelog_category_type.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +module Types + module TimeTracking + class TimelogCategoryType < BaseObject + graphql_name 'TimeTrackingTimelogCategory' + + authorize :read_timelog_category + + field :id, + GraphQL::Types::ID, + null: false, + description: 'Internal ID of the timelog category.' + + field :name, + GraphQL::Types::String, + null: false, + description: 'Name of the category.' + + field :description, + GraphQL::Types::String, + null: true, + description: 'Description of the category.' + + field :color, + Types::ColorType, + null: true, + description: 'Color assigned to the category.' + + field :billable, + GraphQL::Types::Boolean, + null: true, + description: 'Whether the category is billable or not.' + + field :billing_rate, + GraphQL::Types::Float, + null: true, + description: 'Billing rate for the category.' + + field :created_at, + Types::TimeType, + null: false, + description: 'When the category was created.' + + field :updated_at, + Types::TimeType, + null: false, + description: 'When the category was last updated.' + end + end +end |