Subscriptions via WebSockets close when opened #1845
Unanswered
lbkulinski
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Not sure about Postman, but you could alternatively try using graphiql for testing your subscription and set breakpoint to debug through the subscriptions data fetcher. The dependencies look fine to me. We also have an example of a simple subscription that uses websockets here: https://github.com/Netflix/dgs-framework/blob/master/graphql-dgs-example-shared/src/main/java/com/netflix/graphql/dgs/example/shared/datafetcher/SubscriptionDataFetcher.java#L28 Hope that helps. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I am trying to add a subscription via WebSockets. When I try to connect via
ws://localhost:8080/subscriptions
in Postman, I see that the connection is established, but then quickly closes. Upon further inspection, Postman shows1002 An unrecoverable IOException occurred so the connection was closed
.I have the following dependencies for the DGS framework in my
pom.xml
:My schema is as follows:
My handler method is as follows:
When making the request, I don't see any errors in the console. If seeing the full application would be helpful, the repository can be found here: https://github.com/lbkulinski/cta4j-back-end.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions