-
-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Subscription field must return Async Iterable. Received: undefined. #1362
Comments
Please create a PR with a failing test case. I can't guess from your snippets what's wrong with your apollo server, federation or server configuration. |
@V1os {
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"lib": ["es2018", "esnext.asynciterable"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
} |
@carlocorradini hi. Yee, i provided needs options |
@V1os Can you share the project or a failing example? |
@carlocorradini |
@V1os Federation version 1 or version 2? |
2 |
Found the issue, Federation 2 requires |
@carlocorradini tnx bro, i will write about the status. |
@V1os Can we close this issue? 🥳 |
Yep, there is a reason in version |
though, this is not version ( |
Did you created a different project with |
it is a lerna workspace (subscription service) with his package, and |
Unfortunately, without the code or a minimal example, I can't determine what the cause could be. |
I experience a variant of this issue. My error message is:
It happens when there's at least 1h uninterupted connection between client and server |
This error happens to me when my |
Workaround for Instead of returning Edit: oof, this leaks stack traces to the frontend though 😕 |
I have my resolvers (and schema) separated by small files. In the case of resolvers, they are javascript files, with a final export default resolvers;, and that's the line I had forgotten. I'll show the code just in case:
|
@dev-bhargav7 Is this a TypeGraphQL code? |
@MichalLytek subscriptions are broken with graphql-yoga too, https://github.com/ceddybi/graphql-workers-subscriptions/blob/main/example/app/schema.ts |
@ceddybi What do you mean by "broken"? I would say it's an issue with your setup. Subscriptions are really simple, it's just an async iterator. The whole transportation stuff is outside the TypeGraphQL's jurisdiction. |
which part is broken, i've used it like this since v1.1.1
@MichalLytek problem is the async iterator and topics are not picked up by the handler |
@ceddybi So please try to reproduce your issue in isolation: For me your use cases are covered in the test scenarios, so if |
Describe the Bug
Error after subscription client.
To Reproduce
Expected Behavior
After execution of subscription operation on Studio ApolloGraphql sandbox, i expect to connect to the socket, and receive messages on the emission of events. But get the error subscribe
Logs
Environment (please complete the following information):
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: