diff options
Diffstat (limited to 'app/graphql/types/group_type.rb')
-rw-r--r-- | app/graphql/types/group_type.rb | 69 |
1 files changed, 52 insertions, 17 deletions
diff --git a/app/graphql/types/group_type.rb b/app/graphql/types/group_type.rb index 7a84e76657b..a44281b2bdf 100644 --- a/app/graphql/types/group_type.rb +++ b/app/graphql/types/group_type.rb @@ -8,39 +8,65 @@ module Types expose_permissions Types::PermissionTypes::Group - field :web_url, GraphQL::STRING_TYPE, null: false, + field :web_url, + type: GraphQL::STRING_TYPE, + null: false, description: 'Web URL of the group.' - field :avatar_url, GraphQL::STRING_TYPE, null: true, + field :avatar_url, + type: GraphQL::STRING_TYPE, + null: true, description: 'Avatar URL of the group.' - field :custom_emoji, Types::CustomEmojiType.connection_type, null: true, + field :custom_emoji, + type: Types::CustomEmojiType.connection_type, + null: true, description: 'Custom emoji within this namespace.', feature_flag: :custom_emoji - field :share_with_group_lock, GraphQL::BOOLEAN_TYPE, null: true, + field :share_with_group_lock, + type: GraphQL::BOOLEAN_TYPE, + null: true, description: 'Indicates if sharing a project with another group within this group is prevented.' - field :project_creation_level, GraphQL::STRING_TYPE, null: true, method: :project_creation_level_str, + field :project_creation_level, + type: GraphQL::STRING_TYPE, + null: true, + method: :project_creation_level_str, description: 'The permission level required to create projects in the group.' - field :subgroup_creation_level, GraphQL::STRING_TYPE, null: true, method: :subgroup_creation_level_str, + field :subgroup_creation_level, + type: GraphQL::STRING_TYPE, + null: true, + method: :subgroup_creation_level_str, description: 'The permission level required to create subgroups within the group.' - field :require_two_factor_authentication, GraphQL::BOOLEAN_TYPE, null: true, + field :require_two_factor_authentication, + type: GraphQL::BOOLEAN_TYPE, + null: true, description: 'Indicates if all users in this group are required to set up two-factor authentication.' - field :two_factor_grace_period, GraphQL::INT_TYPE, null: true, + field :two_factor_grace_period, + type: GraphQL::INT_TYPE, + null: true, description: 'Time before two-factor authentication is enforced.' - field :auto_devops_enabled, GraphQL::BOOLEAN_TYPE, null: true, + field :auto_devops_enabled, + type: GraphQL::BOOLEAN_TYPE, + null: true, description: 'Indicates whether Auto DevOps is enabled for all projects within this group.' - field :emails_disabled, GraphQL::BOOLEAN_TYPE, null: true, + field :emails_disabled, + type: GraphQL::BOOLEAN_TYPE, + null: true, description: 'Indicates if a group has email notifications disabled.' - field :mentions_disabled, GraphQL::BOOLEAN_TYPE, null: true, + field :mentions_disabled, + type: GraphQL::BOOLEAN_TYPE, + null: true, description: 'Indicates if a group is disabled from getting mentioned.' - field :parent, GroupType, null: true, + field :parent, + type: GroupType, + null: true, description: 'Parent group.' field :issues, @@ -55,7 +81,7 @@ module Types description: 'Merge requests for projects in this group.', resolver: Resolvers::GroupMergeRequestsResolver - field :milestones, Types::MilestoneType.connection_type, null: true, + field :milestones, description: 'Milestones of the group.', resolver: Resolvers::GroupMilestonesResolver @@ -76,9 +102,10 @@ module Types Types::LabelType, null: true, description: 'A label available on this group.' do - argument :title, GraphQL::STRING_TYPE, - required: true, - description: 'Title of the label.' + argument :title, + type: GraphQL::STRING_TYPE, + required: true, + description: 'Title of the label.' end field :group_members, @@ -92,7 +119,9 @@ module Types resolver: Resolvers::ContainerRepositoriesResolver, authorize: :read_container_image - field :container_repositories_count, GraphQL::INT_TYPE, null: false, + field :container_repositories_count, + type: GraphQL::INT_TYPE, + null: false, description: 'Number of container repositories in the group.' field :packages, @@ -114,6 +143,12 @@ module Types description: 'Labels available on this group.', resolver: Resolvers::GroupLabelsResolver + field :timelogs, ::Types::TimelogType.connection_type, null: false, + description: 'Time logged on issues in the group and its subgroups.', + extras: [:lookahead], + complexity: 5, + resolver: ::Resolvers::TimelogResolver + def avatar_url object.avatar_url(only_path: false) end |