The error thrown "Subscription field must return Async Iterable. Received: undefined" should include where in the schema it called the subscription field and it returned undefined.
I had a slight misunderstanding about how subscriptions work so the solution is probably slightly different:
In my case I didn't provide a subscribe method on the field. So the error should actually complain that the subscribe method is missing and not that it returned undefined.
In either case, it should include the field name.
For anyone else here, i got this message from a typo in my "subscribe: () => {asyncIterator}"
I had subscibe *rolls eyes
Most helpful comment
I had a slight misunderstanding about how subscriptions work so the solution is probably slightly different:
In my case I didn't provide a subscribe method on the field. So the error should actually complain that the subscribe method is missing and not that it returned undefined.
In either case, it should include the field name.