Module: GraphQL::Subscriptions::SubscriptionRoot::InstanceMethods

Defined in:
lib/graphql/subscriptions/subscription_root.rb

Overview

This is for maintaining backwards compatibility: if a subscription field is created without a subscription: resolver class, then implement the method with the previous default behavior.

Instance Method Summary collapse

Instance Method Details

#skip_subscription_rootObject



15
16
17
18
19
20
21
# File 'lib/graphql/subscriptions/subscription_root.rb', line 15

def skip_subscription_root(*)
  if context.query.subscription_update?
    object
  else
    context.skip
  end
end