Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rescue_from Does Not Work With Execution::Interpreter and/or Analysis::AST #3198

Closed
sshaw opened this issue Oct 20, 2020 · 3 comments
Closed

Comments

@sshaw
Copy link

sshaw commented Oct 20, 2020

Describe the bug

Just upgraded from 1.8.10 to 1.11.5. Was using GraphQL Guard and came across this issue. Further investigation showed that in general rescue_from was no longer working.

In the below example I expect ActiveRecord::RecordNotFound to be rescued and "ERROR!" printed but, it's not, it's just propagated. Never touched by RescueMiddleware.

When:

use GraphQL::Execution::Interpreter
use GraphQL::Analysis::AST

are commented out it works as expected.

The reason I'm using these 2 is because they're required by GraphQL Guard. When not included it raises an error. Certainly the underlying issue could be there. Not sure hence this issue.

Versions

graphql version: 1.11.5
rails (or other framework): 5.2.3
graphql-batch: 0.4.3

GraphQL schema

class MySchema < GraphQL::Schema
  use GraphQL::Tracing::NewRelicTracing, set_transaction_name: true

  mutation TypesMyMutationType
  query MyQueryType

  use GraphQL::Execution::Interpreter
  use GraphQL::Analysis::AST
  # use GraphQL::Guard.new(
  #       policy_object: MyPolicy,
  #       not_authorized: ->(type, field) {
  #         handler
  #       }
  #     )
  #use GraphQL::Batch

  rescue_from ActiveRecord::RecordNotFound do |e|
    p "ERROR!"
  end
end

Steps to reproduce

Raise an ActiveRecord::RecordNotFound error from a field

Expected behavior

rescue_from is invoked

Actual behavior

rescue_from is not invoked

Place full backtrace here (if a Ruby exception is involved):

Click to view exception backtrace
# /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/resolver.rb:101:in `public_send'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/resolver.rb:101:in `block (3 levels) in resolve_with_support'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:112:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/resolver.rb:89:in `block (2 levels) in resolve_with_support'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:112:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/resolver.rb:81:in `block in resolve_with_support'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:112:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/resolver.rb:70:in `resolve_with_support'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:690:in `public_send'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:690:in `block in public_send_field'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:726:in `with_extensions'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:672:in `public_send_field'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:585:in `block in resolve'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:112:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:583:in `resolve'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:226:in `block (5 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:81:in `call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:83:in `block in call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/platform_tracing.rb:52:in `block in trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/new_relic_tracing.rb:34:in `block in platform_trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/newrelic_rpm-6.3.0.355/lib/new_relic/agent/method_tracer_helpers.rb:30:in `trace_execution_scoped'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/new_relic_tracing.rb:33:in `platform_trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/platform_tracing.rb:51:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:83:in `call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:67:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:225:in `block (4 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/query.rb:353:in `block in with_error_handling'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/errors.rb:30:in `with_error_handling'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/query.rb:352:in `with_error_handling'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:224:in `block (3 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:385:in `resolve_with_directives'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:221:in `block (2 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:460:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:179:in `block in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:126:in `each'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:126:in `evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:58:in `run_eager'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter.rb:73:in `block in evaluate'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:81:in `call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:83:in `block in call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/platform_tracing.rb:26:in `block in trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/new_relic_tracing.rb:34:in `block in platform_trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/newrelic_rpm-6.3.0.355/lib/new_relic/agent/method_tracer_helpers.rb:30:in `trace_execution_scoped'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/new_relic_tracing.rb:33:in `platform_trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/platform_tracing.rb:25:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:83:in `call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:67:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter.rb:72:in `evaluate'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter.rb:45:in `begin_query'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:112:in `begin_query'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:83:in `block in run_as_multiplex'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:82:in `map'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:82:in `run_as_multiplex'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:61:in `block (2 levels) in run_queries'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:195:in `block in instrument_and_analyze'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:29:in `block (2 levels) in apply_instrumenters'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:46:in `block (2 levels) in each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:41:in `each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:45:in `block in each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:72:in `call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:44:in `each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:27:in `block in apply_instrumenters'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:72:in `call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:26:in `apply_instrumenters'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:174:in `instrument_and_analyze'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:60:in `block in run_queries'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:81:in `call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:83:in `block in call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/platform_tracing.rb:26:in `block in trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/new_relic_tracing.rb:34:in `block in platform_trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/newrelic_rpm-6.3.0.355/lib/new_relic/agent/method_tracer_helpers.rb:30:in `trace_execution_scoped'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/new_relic_tracing.rb:33:in `platform_trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing/platform_tracing.rb:25:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:83:in `call_tracers'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:67:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:58:in `run_queries'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:48:in `run_all'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:1656:in `multiplex'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:1627:in `execute'
<snip test nane>
@rmosolgo
Copy link
Owner

Hey, sorry for the trouble. Did you try the new errors plugin? https://graphql-ruby.org/errors/error_handling.html

It has a lot better error handling with the interpreter. If you hook that up and still run into trouble, please share the new backtrace.

Sorry about all the crazy plugins, for better or for worse, they'll be the default behavior in 1.12.0 🍻

@sshaw
Copy link
Author

sshaw commented Oct 21, 2020

Hi, when I add use GraphQL::Execution::Errors rescue_from is still not called. Instead when ActiveRecord::RecordNotFound is raised I get the following:

 RuntimeError:
                 Failed to implement MyMutation.myField, tried:
                 - `#<Class:0x00007faae542f828>#myField`, which did not exist
                 - `String#myField`, which did not exist
                 - Looking up hash key `:myField` or `"myField"` on `Model not found with id 1001`, but it wasn't a Hash

                 To implement this field, define one of the methods above (and check for typos)
    # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:708:in `block in public_send_field'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:726:in `with_extensions'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:672:in `public_send_field'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:585:in `block in resolve'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:112:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema/field.rb:583:in `resolve'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:226:in `block (5 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:66:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:225:in `block (4 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/query.rb:353:in `block in with_error_handling'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/errors.rb:41:in `with_error_handling'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/query.rb:352:in `with_error_handling'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:224:in `block (3 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:385:in `resolve_with_directives'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:221:in `block (2 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:460:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:179:in `block in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:126:in `each'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:126:in `evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:337:in `block in continue_field'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:460:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:332:in `continue_field'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:238:in `block (4 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:460:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:232:in `block (3 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:385:in `resolve_with_directives'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:221:in `block (2 levels) in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:460:in `after_lazy'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:179:in `block in evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:126:in `each'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:126:in `evaluate_selections'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter/runtime.rb:58:in `run_eager'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter.rb:73:in `block in evaluate'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:66:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter.rb:72:in `evaluate'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/interpreter.rb:45:in `begin_query'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:112:in `begin_query'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:83:in `block in run_as_multiplex'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:82:in `map'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:82:in `run_as_multiplex'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:61:in `block (2 levels) in run_queries'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:195:in `block in instrument_and_analyze'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:29:in `block (2 levels) in apply_instrumenters'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:46:in `block (2 levels) in each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:41:in `each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:45:in `block in each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:72:in `call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:44:in `each_query_call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:27:in `block in apply_instrumenters'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:72:in `call_hooks'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/instrumentation.rb:26:in `apply_instrumenters'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:174:in `instrument_and_analyze'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:60:in `block in run_queries'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/tracing.rb:66:in `trace'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:58:in `run_queries'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/execution/multiplex.rb:48:in `run_all'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:1656:in `multiplex'
     # /Users/sshaw/.rvm/gems/ruby-2.5.7@qms/gems/graphql-1.11.5/lib/graphql/schema.rb:1627:in `execute'
<SNIP TEST CASE>

@sshaw
Copy link
Author

sshaw commented Oct 26, 2020

Looking back now I see it's because the above rescue_from handler was still returning a String and we must now raise an ExecutionError.

@sshaw sshaw closed this as completed Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants