class GraphQL::Backtrace
Wrap unhandled errors with TracedError.
TracedError provides a GraphQL backtrace with arguments and return values. The underlying error is available as TracedError#cause.
Examples
Example: toggling backtrace annotation
class MySchema < GraphQL::Schema if Rails.env.development? || Rails.env.test? use GraphQL::Backtrace end end
Public Class Methods
Source
# File lib/graphql/backtrace.rb, line 32 def initialize(context, value: nil) @table = Table.new(context, value: value) end
Source
# File lib/graphql/backtrace.rb, line 28 def self.use(schema_defn) schema_defn.using_backtrace = true end
Public Instance Methods
Source
# File lib/graphql/backtrace.rb, line 36 def inspect @table.to_table end
Also aliased as: to_s