Forked nest-typescript-starter. Tried example nest/sample/23-graphql-code-first
Go http://127.0.0.1:3000/graphql and subscribe:
subscription {
recipeAdded {
id
}
}
API returns:
{
"error": {
"message": "Subscription field must return Async Iterable. Received: undefined"
}
}
https://github.com/nestjs/graphql/pull/250/commits/67229099709d6753bc59cc16229ca015834bd420
Subscription should work
Nest version: 7.0.0
For Tooling issues:
- Node version: v12.10.0
- Platform: Mac
Others:
Yarn: 1.21.1
Same for me. The old issues do not help at all, unfortunately.
The subscription resolver is not even called.
Should fix https://github.com/nestjs/graphql/pull/667. It seems subscribe() the method of @Subscription decorator is not copied to the final resolvers object.
Fixed in 7.0.4. Thanks for reporting & PR!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Fixed in 7.0.4. Thanks for reporting & PR!