lib/graphql/subscriptions.rb in graphql-2.0.12 vs lib/graphql/subscriptions.rb in graphql-2.0.13
- old
+ new
@@ -60,14 +60,11 @@
# @param scope [Symbol, String]
# @param context [Hash]
# @return [void]
def trigger(event_name, args, object, scope: nil, context: {})
# Make something as context-like as possible, even though there isn't a current query:
- context = @schema.context_class.new(
- query: GraphQL::Query.new(@schema, "", validate: false),
- object: nil,
- values: context
- )
+ dummy_query = GraphQL::Query.new(@schema, "", validate: false, context: context)
+ context = dummy_query.context
event_name = event_name.to_s
# Try with the verbatim input first:
field = @schema.get_field(@schema.subscription, event_name, context)