Class: Resolvers::TimelogResolver

Inherits:
BaseResolver
  • Object
show all
Includes:
LooksAhead
Defined in:
app/graphql/resolvers/timelog_resolver.rb

Instance Method Summary collapse

Methods included from LooksAhead

#apply_lookahead, #resolve

Methods inherited from BaseResolver

as_single, authorization, authorized?, before_connection_authorization, before_connection_authorization_block, calculate_ext_conn_complexity, calls_gitaly!, complexity, complexity_multiplier, #current_user, field_options, last, #object, #offset_pagination, requires_argument!, resolver_complexity, #select_result, single, #single?, single_definition_blocks, singular_type, when_single

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Instance Method Details

#resolve_with_lookahead(**args) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'app/graphql/resolvers/timelog_resolver.rb', line 42

def resolve_with_lookahead(**args)
  validate_args!(object, args)

  timelogs = object&.timelogs || Timelog.all

  args = parse_datetime_args(args)

  timelogs = apply_user_filter(timelogs, args)
  timelogs = apply_project_filter(timelogs, args)
  timelogs = apply_time_filter(timelogs, args)
  timelogs = apply_group_filter(timelogs, args)
  timelogs = apply_sorting(timelogs, args)

  apply_lookahead(timelogs)
end