We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7db9f23 commit 596bca7Copy full SHA for 596bca7
1 file changed
spec/graphql/dataloader/null_dataloader_spec.rb
@@ -0,0 +1,14 @@
1
+# frozen_string_literal: true
2
+require "spec_helper"
3
+
4
+describe "GraphQL NullDataloader" do
5
+ it "can run_isolated with previously-captured blocks that register lazies" do
6
+ dl = GraphQL::Dataloader::NullDataloader.new
7
+ result = 0
8
+ dl.run_isolated {
9
+ lazy = GraphQL::Execution::Lazy.new { result = 100 }
10
+ dl.lazy_at_depth(1, lazy)
11
+ }
12
+ assert_equal 100, result
13
+ end
14
+end
0 commit comments