Class: Subscriptions::BaseSubscription

Inherits:
GraphQL::Schema::Subscription
  • Object
show all
Defined in:
app/graphql/subscriptions/base_subscription.rb

Direct Known Subclasses

IssuableUpdated

Instance Method Summary collapse

Constructor Details

#initialize(object:, context:, field:) ⇒ BaseSubscription

Returns a new instance of BaseSubscription.


8
9
10
11
12
13
# File 'app/graphql/subscriptions/base_subscription.rb', line 8

def initialize(object:, context:, field:)
  super

  # Reset user so that we don't use a stale user for authorization
  current_user.reset if current_user
end

Instance Method Details

#authorized?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)

15
16
17
# File 'app/graphql/subscriptions/base_subscription.rb', line 15

def authorized?(*)
  raise NotImplementedError
end