Module: Rails::GraphQL::Request::Backtrace
Overview
GraphQL Request Backtrace
Display any request errors in a nice way. By default, it won’t display anything that is internal of this gem, but
Constant Summary collapse
- COL_MAX_WIDTH =
100
Instance Method Summary collapse
-
#print(error, component, request) ⇒ Object
Display the provided
error
from the providedrequest
. -
#skip?(error) ⇒ Boolean
Check if the given
error
should be skipped TODO: Maybe checkcause
to proper evaluate the skip.
Instance Method Details
#print(error, component, request) ⇒ Object
Display the provided error
from the provided request
27 28 29 30 31 32 33 34 |
# File 'lib/rails/graphql/request/backtrace.rb', line 27 def print(error, component, request) return if skip?(error) table = print_table(error, component, request) info = print_backtrace(error, request) request.schema.logger.error(+"#{table}\n\n#{info}") end |
#skip?(error) ⇒ Boolean
Check if the given error
should be skipped TODO: Maybe check cause
to proper evaluate the skip
22 23 24 |
# File 'lib/rails/graphql/request/backtrace.rb', line 22 def skip?(error) error.class <= skip_base_class end |