Subscription field must return Async Iterable. Received: undefined



Does anyone know what this means?

Subscription field must return Async Iterable. Received: undefined



It means that somewhere, some piece of code expected an object to be an async iterable, but it was undefined instead :slight_smile:

To me, it’s not clear where exactly that piece of code is actually running - it might be the GraphQL Playground, it might be your server code, or something entirely different.

Can you share a bit more context how you ended up with this error message? That would be tremendously helpful in understanding what’s going on :raised_hands:


Hey @nilan I am getting this error as well and I think it’s because I haven’t added the resolver for the subscription.

I can’t seem to find anything in the prisma docs but I have this in the schema.graphql

type Subscription {
  truck(where: TruckSubscriptionWhereInput!): TruckSubscriptionPayload

When I go to the playground and try to execute the subscription I get the OP error message.

What do I need to do to resolve this? It works if I access the database playground directly.


Hey @johhansantana, interesting!

That sounds like the likely cause, have you tried adding the subscription resolver, like in this example? :slight_smile:

@jingle, might that also be the problem you’re facing?


yes, that worked perfectly. I should look more often in those examples!


Great @johhansantana, glad that helped!

If you have any feedback for improving the examples feel free to share it!
Also, PRs are highly welcome if you see something to improve or want to provide a small example yourself.

Cheers :raised_hands:


Could you tell me how to fix this error?
“error”: {
“message”: “Subscription field must return Async Iterable. Received: undefined”

                type Subscription {
                      course(where: CourseSubscriptionWhereInput): CourseSubscriptionPayload

  const {forwardTo} = require('prisma-binding);
    Subscription: {
        course: forwardTo('db')


What is the version of prisma-binding?

Sorry, there’s a mistake in your code, you forgot to add subscribe key:

const {forwardTo} = require('prisma-binding);

const Subscription = {
    course: {
        subscribe: forwardTo('db)


I tried it. Subscription is not working. When I create new record prisma server stops the subscription and listen for the new data.
Any idea or suggestion please?


Do you have the code somewhere? Do you have the link to graphql playground? Thanks!


Please checkout the subscription branch
git checkout subscription
Please let me know If I need to update anything.


I got exactly the same problem. I forgot to add the resolver to the subscription.