Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/user_interface.rb')
-rw-r--r--app/graphql/types/user_interface.rb31
1 files changed, 21 insertions, 10 deletions
diff --git a/app/graphql/types/user_interface.rb b/app/graphql/types/user_interface.rb
index 7d61b296eae..71c6b7f3019 100644
--- a/app/graphql/types/user_interface.rb
+++ b/app/graphql/types/user_interface.rb
@@ -14,20 +14,20 @@ module Types
method: :itself
field :id,
- type: GraphQL::ID_TYPE,
+ type: GraphQL::Types::ID,
null: false,
description: 'ID of the user.'
field :bot,
- type: GraphQL::BOOLEAN_TYPE,
+ type: GraphQL::Types::Boolean,
null: false,
description: 'Indicates if the user is a bot.',
method: :bot?
field :username,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'Username of the user. Unique within this instance of GitLab.'
field :name,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'Human-readable name of the user.'
field :state,
@@ -35,24 +35,24 @@ module Types
null: false,
description: 'State of the user.'
field :email,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: true,
description: 'User email.', method: :public_email,
deprecated: { reason: :renamed, replacement: 'User.publicEmail', milestone: '13.7' }
field :public_email,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: true,
description: "User's public email."
field :avatar_url,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: true,
description: "URL of the user's avatar."
field :web_url,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'Web URL of the user.'
field :web_path,
- type: GraphQL::STRING_TYPE,
+ type: GraphQL::Types::String,
null: false,
description: 'Web path of the user.'
field :group_memberships,
@@ -67,7 +67,7 @@ module Types
null: true,
description: 'User status.'
field :location,
- type: ::GraphQL::STRING_TYPE,
+ type: ::GraphQL::Types::String,
null: true,
description: 'The location of the user.'
field :project_memberships,
@@ -77,6 +77,10 @@ module Types
field :starred_projects,
description: 'Projects starred by the user.',
resolver: Resolvers::UserStarredProjectsResolver
+ field :namespace,
+ type: Types::NamespaceType,
+ null: true,
+ description: 'Personal namespace of the user.'
field :todos, resolver: Resolvers::TodoResolver, description: 'To-do items of the user.' do
extension(::Gitlab::Graphql::TodosProjectPermissionPreloader::FieldExtension)
@@ -100,6 +104,13 @@ module Types
Types::UserCalloutType.connection_type,
null: true,
description: 'User callouts that belong to the user.'
+ field :timelogs,
+ Types::TimelogType.connection_type,
+ null: true,
+ description: 'Time logged by the user.',
+ extras: [:lookahead],
+ complexity: 5,
+ resolver: ::Resolvers::TimelogResolver
definition_methods do
def resolve_type(object, context)