subscribe returns the async iterable the field streams from and is
attached to the schema field's subscribe slot; the optional resolve maps
each emitted payload to the field value, exactly as graphql defines it.
Without this arm a subscription is unexpressible in the schema-first map:
an entry has to be a function, and assigning { subscribe } to a field's
resolve leaves subscribe unset, which makes graphql.subscribe() throw
"Subscription field must return Async Iterable".
A subscription field's resolver pair.
subscribereturns the async iterable the field streams from and is attached to the schema field'ssubscribeslot; the optionalresolvemaps each emitted payload to the field value, exactly as graphql defines it.Without this arm a subscription is unexpressible in the schema-first map: an entry has to be a function, and assigning
{ subscribe }to a field'sresolveleavessubscribeunset, which makesgraphql.subscribe()throw "Subscription field must return Async Iterable".Since
0.3.0