lib/graphql/execution/lazy.rb in graphql-1.12.12 vs lib/graphql/execution/lazy.rb in graphql-1.12.13
- old
+ new
@@ -46,10 +46,14 @@
rescue GraphQL::ExecutionError => err
err
end
end
- if @value.is_a?(StandardError)
+ # `SKIP` was made into a subclass of `GraphQL::Error` to improve runtime performance
+ # (fewer clauses in a hot `case` block), but now it requires special handling here.
+ # I think it's still worth it for the performance win, but if the number of special
+ # cases grows, then maybe it's worth rethinking somehow.
+ if @value.is_a?(StandardError) && @value != GraphQL::Execution::Execute::SKIP
raise @value
else
@value
end
end