lib/graphql/subscriptions/instrumentation.rb in graphql-1.8.1 vs lib/graphql/subscriptions/instrumentation.rb in graphql-1.8.2
- old
+ new
@@ -42,10 +42,13 @@
@inner_proc = inner_proc
end
# Wrap the proc with subscription registration logic
def call(obj, args, ctx)
+ @inner_proc.call(obj, args, ctx) if @inner_proc && !@inner_proc.is_a?(GraphQL::Field::Resolve::BuiltInResolve)
+
events = ctx.namespace(:subscriptions)[:events]
+
if events
# This is the first execution, so gather an Event
# for the backend to register:
events << Subscriptions::Event.new(
name: ctx.field.name,