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

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

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

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