diff options
Diffstat (limited to 'app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb b/app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb index 5027403e95c..09e76dba645 100644 --- a/app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb +++ b/app/graphql/resolvers/error_tracking/sentry_detailed_error_resolver.rb @@ -3,19 +3,22 @@ module Resolvers module ErrorTracking class SentryDetailedErrorResolver < BaseResolver - argument :id, GraphQL::ID_TYPE, + type Types::ErrorTracking::SentryDetailedErrorType, null: true + + argument :id, ::Types::GlobalIDType[::Gitlab::ErrorTracking::DetailedError], required: true, description: 'ID of the Sentry issue' - def resolve(**args) - current_user = context[:current_user] - issue_id = GlobalID.parse(args[:id])&.model_id + def resolve(id:) + # TODO: remove this line when the compatibility layer is removed + # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883 + id = ::Types::GlobalIDType[::Gitlab::ErrorTracking::DetailedError].coerce_isolated_input(id) # Get data from Sentry response = ::ErrorTracking::IssueDetailsService.new( project, current_user, - { issue_id: issue_id } + { issue_id: id.model_id } ).execute issue = response[:issue] issue.gitlab_project = project if issue |