lib/graphql/subscriptions.rb in graphql-1.9.2 vs lib/graphql/subscriptions.rb in graphql-1.9.3
- old
+ new
@@ -41,15 +41,15 @@
# @return [void]
def trigger(event_name, args, object, scope: nil)
event_name = event_name.to_s
# Try with the verbatim input first:
- field = @schema.get_field("Subscription", event_name)
+ field = @schema.get_field(@schema.subscription, event_name)
if field.nil?
# And if it wasn't found, normalize it:
normalized_event_name = normalize_name(event_name)
- field = @schema.get_field("Subscription", normalized_event_name)
+ field = @schema.get_field(@schema.subscription, normalized_event_name)
if field.nil?
raise InvalidTriggerError, "No subscription matching trigger: #{event_name} (looked for #{@schema.subscription.graphql_name}.#{normalized_event_name})"
end
else
# Since we found a field, the original input was already normalized