Module: GraphQL::Streaming::AssignSubscriptionField
- Defined in:
- lib/graphql/streaming/assign_subscription_field.rb
Defined Under Namespace
Classes: SubscriptionResolve
Class Method Summary collapse
-
.call(*args, &block) ⇒ Object
Wrap resolve_proc with subscription registration logic.
Class Method Details
.call(*args, &block) ⇒ Object
Wrap resolve_proc with subscription registration logic.
13 14 15 16 17 18 19 20 21 |
# File 'lib/graphql/streaming/assign_subscription_field.rb', line 13 def self.call(*args, &block) = GraphQL::Define::AssignObjectField.call(*args, &block) # ensure defined # TODO: resolve_proc should be a lazy attr reader field_name = .name original_resolve = .resolve_proc .resolve = SubscriptionResolve.new(field_name, original_resolve) # Field was assigned to type_defn in AssignObjectField end |