Skip to content

Commit 3b6c1cf

Browse files
author
Robert Mosolgo
authored
Merge pull request rmosolgo#2102 from cschiewek/master
Fix bug in subscriptions#trigger
2 parents 6b2138d + c272e50 commit 3b6c1cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/graphql/subscriptions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def trigger(event_name, args, object, scope: nil)
4343
event_name = event_name.to_s
4444

4545
# Try with the verbatim input first:
46-
field = @schema.get_field("Subscription", event_name)
46+
field = @schema.get_field(@schema.subscription, event_name)
4747

4848
if field.nil?
4949
# And if it wasn't found, normalize it:
5050
normalized_event_name = normalize_name(event_name)
51-
field = @schema.get_field("Subscription", normalized_event_name)
51+
field = @schema.get_field(@schema.subscription, normalized_event_name)
5252
if field.nil?
5353
raise InvalidTriggerError, "No subscription matching trigger: #{event_name} (looked for #{@schema.subscription.graphql_name}.#{normalized_event_name})"
5454
end

0 commit comments

Comments
 (0)