diff options
Diffstat (limited to 'app/graphql/types/projects/repository_language_type.rb')
-rw-r--r-- | app/graphql/types/projects/repository_language_type.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/graphql/types/projects/repository_language_type.rb b/app/graphql/types/projects/repository_language_type.rb new file mode 100644 index 00000000000..76c645c0e85 --- /dev/null +++ b/app/graphql/types/projects/repository_language_type.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Types + module Projects + # rubocop: disable Graphql/AuthorizeTypes + class RepositoryLanguageType < BaseObject + graphql_name 'RepositoryLanguage' + + field :name, GraphQL::Types::String, null: false, + description: 'Name of the repository language.' + + field :share, GraphQL::Types::Float, null: true, + description: "Percentage of the repository's languages." + + field :color, Types::ColorType, null: true, + description: 'Color to visualize the repository language.' + end + # rubocop: enable Graphql/AuthorizeTypes + end +end |