diff options
Diffstat (limited to 'app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb')
-rw-r--r-- | app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb b/app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb new file mode 100644 index 00000000000..e6d02c948d5 --- /dev/null +++ b/app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Types + module ErrorTracking + # rubocop: disable Graphql/AuthorizeTypes + class SentryErrorStackTraceContextType < ::Types::BaseObject + graphql_name 'SentryErrorStackTraceContext' + description 'An object context for a Sentry error stack trace' + + field :line, + GraphQL::INT_TYPE, + null: false, + description: 'Line number of the context' + field :code, + GraphQL::STRING_TYPE, + null: false, + description: 'Code number of the context' + + def line + object[0] + end + + def code + object[1] + end + end + # rubocop: enable Graphql/AuthorizeTypes + end +end |