lib/graphql/schema/subscription.rb in graphql-1.9.17 vs lib/graphql/schema/subscription.rb in graphql-1.9.18
- old
+ new
@@ -37,16 +37,16 @@
# Implement the {Resolve} API
def resolve(**args)
# Dispatch based on `@mode`, which will raise a `NoMethodError` if we ever
# have an unexpected `@mode`
- public_send("resolve_#{@mode}", args)
+ public_send("resolve_#{@mode}", **args)
end
# Wrap the user-defined `#subscribe` hook
- def resolve_subscribe(args)
- ret_val = args.any? ? subscribe(args) : subscribe
+ def resolve_subscribe(**args)
+ ret_val = args.any? ? subscribe(**args) : subscribe
if ret_val == :no_response
context.skip
else
ret_val
end
@@ -60,11 +60,11 @@
def subscribe(args = {})
:no_response
end
# Wrap the user-provided `#update` hook
- def resolve_update(args)
- ret_val = args.any? ? update(args) : update
+ def resolve_update(**args)
+ ret_val = args.any? ? update(**args) : update
if ret_val == :no_update
raise NoUpdateError
else
ret_val
end