Class: Types::TimelogType
Instance Method Summary
collapse
Methods inherited from BaseObject
accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id
#present, #unpresented
Instance Method Details
#issue ⇒ Object
60
61
62
|
# File 'app/graphql/types/timelog_type.rb', line 60
def issue
Gitlab::Graphql::Loaders::BatchModelLoader.new(Issue, object.issue_id).find
end
|
#spent_at ⇒ Object
64
65
66
|
# File 'app/graphql/types/timelog_type.rb', line 64
def spent_at
object.spent_at || object.created_at
end
|
#user ⇒ Object
56
57
58
|
# File 'app/graphql/types/timelog_type.rb', line 56
def user
Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id, default_value: default_ghost).find
end
|