Class: Resolvers::ErrorTracking::SentryErrorStackTraceResolver

Inherits:
BaseResolver
  • Object
show all
Defined in:
app/graphql/resolvers/error_tracking/sentry_error_stack_trace_resolver.rb

Instance Method Summary collapse

Methods inherited from BaseResolver

complexity, complexity_multiplier, #current_user, last, #object, resolver_complexity, #select_result, single, #single?, #synchronized_object

Methods included from Gitlab::Utils::Override

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

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#resolve(**args) ⇒ Object


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/graphql/resolvers/error_tracking/sentry_error_stack_trace_resolver.rb', line 10

def resolve(**args)
  issue_id = GlobalID.parse(args[:id])&.model_id

  # Get data from Sentry
  response = ::ErrorTracking::IssueLatestEventService.new(
    project,
    current_user,
    { issue_id: issue_id }
  ).execute

  event = response[:latest_event]
  event.gitlab_project = project if event

  event
end