We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e476f7c commit c43bfc4Copy full SHA for c43bfc4
lib/graphql/batch/loader.rb
@@ -66,12 +66,21 @@ def resolve #:nodoc:
66
return if resolved?
67
load_keys = queue
68
@queue = nil
69
- perform(load_keys)
+
70
+ around_perform do
71
+ perform(load_keys)
72
+ end
73
74
check_for_broken_promises(load_keys)
75
rescue => err
76
reject_pending_promises(load_keys, err)
77
end
78
79
+ # Interface to add custom code for purposes such as instrumenting the performance of the loader.
80
+ def around_perform
81
+ yield
82
83
84
# For Promise#sync
85
def wait #:nodoc:
86
if executor
lib/graphql/batch/version.rb
@@ -1,5 +1,5 @@
1
module GraphQL
2
module Batch
3
- VERSION = "0.5.2"
+ VERSION = "0.5.3"
4
5
0 commit comments