Skip to content

Commit 413984b

Browse files
authored
Merge pull request rmosolgo#4335 from rmosolgo/simplify-lazy
remove error handling from Lazy#value
2 parents 3d888ea + de476af commit 413984b

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

lib/graphql/execution/lazy.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,11 @@ def initialize(path: nil, field: nil, &get_value_func)
2929
def value
3030
if !@resolved
3131
@resolved = true
32-
@value = begin
33-
v = @get_value_func.call
34-
if v.is_a?(Lazy)
35-
v = v.value
36-
end
37-
v
38-
rescue GraphQL::ExecutionError => err
39-
err
32+
v = @get_value_func.call
33+
if v.is_a?(Lazy)
34+
v = v.value
4035
end
36+
@value = v
4137
end
4238

4339
# `SKIP` was made into a subclass of `GraphQL::Error` to improve runtime performance

0 commit comments

Comments
 (0)