lib/rails/graphql/request/component.rb
# Run a given block and ensure to capture exceptions to set them as
# errors
Run a given block and ensure to capture exceptions to set them as
errors
Run a given block and ensure to capture exceptions to set them as errors
def capture_exception(stage, invalidate = false)
            yield
          rescue StandardError => error
            invalidate! if invalidate
            stack_path = request.stack_to_path
            stack_path << gql_name if respond_to?(:gql_name) && gql_name.present?
            request.exception_to_error(error, @node, path: stack_path, stage: stage.to_s)
          end
def capture_exception ( stage , invalidate = false ) yield rescue StandardError => error invalidate! if invalidate stack_path = request . stack_to_path stack_path << gql_name if respond_to? ( :gql_name ) && gql_name . present? request . exception_to_error ( error , @node , path : stack_path , stage : stage . to_s ) end
Run a given block and ensure to capture exceptions to set them as
errors
Run a given block and ensure to capture exceptions to set them as errors
stage
invalidate