Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Pusher; end
module GraphQL
module Pro
class BackgroundSubscriptions < Subscriptions
alias :execute_synchronously :execute
def execute(sub_id, event, object)
SubscriptionUpdateJob.perform_later(sub_id, Base64.encode64(Marshal.dump(event)), object)
end
class SubscriptionUpdateJob < ApplicationJob
def perform(sub_id, event, object)
OpencityRailsSchema.subscriptions.execute_synchronously(sub_id, Marshal.load(Base64.decode64(event)), object)
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.