Comments (7)
Hi @Shahor, thanks for reporting this - it is most probably a bug! I have a hunch about what causes it, will fix it probably together with the upcoming PR.
Regarding the retryStrategy
in #84 - I like the idea a lot! Will include this in the PR, thanks for the suggestion. 👍
from graphql-ws.
Ah, that is great news thanks for considering it 🙇
I'd be happy to test this in my environment if you want once ready.
from graphql-ws.
@enisdenjo You rock 💪
from graphql-ws.
Hey @enisdenjo 👋
Great on work on the graphql-ws library!
I'm fighting a bit with this issue this morning, I'm seeing a double problem here:
- When my server restarts, the client waits
retryTimeout
before making a new connection, but if the server is not started yet when theretryTimeout
is done, it'll just loopretryAttempts
times without respecting theretryTimeout
. What can I do to make sureretryTimeout
(orretryStrategy(tryNumber: number)
) is properly awaited?
The scenario down below is happening with the following configuration:
return new SubscriptionLink({
url: subscriptionsEndpoint,
retryTimeout: 30e3,
on: { /* event handlers */ }
})
As you can see, the retryTimeout
is not used for the socket reconnection attempts.
- I've see the pr #84 , I think it would be nice to actually give access to the
retryStrategy
ala ioredis so everyone can implement their own backoff strategy according to their needs, wdyt?
from graphql-ws.
@enisdenjo I am very sorry for being pushy with this, is there any chance you'd have an ETA for at least the buggy part?
I'm happy to help if needed to make this move forward :) (It's blocking us a bit as we're switching to graphql-ws
because of a bug that it fixes compared to subscriptions-transport-ws
)
Just let me know if I can help you on this :)
from graphql-ws.
No worries, I can understand!
I'll try pushing the fix later today (am currently swamped with my day job, as soon as I am done - I'll come back to the PR).
from graphql-ws.
🎉 This issue has been resolved in version 3.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from graphql-ws.
Related Issues (20)
- Allow to update connectionParams
- fix incorrect Bad Gateway error code HOT 3
- Subscriptions not working with Hasura via apollo Client graphql. error - Error: WebSocket implementation missing; HOT 1
- rename onMessage in server to postMessage, withMessage (or something more appropriate) HOT 1
- How to use `graphql-ws` protocol?
- Websocket using bun server - Unable to access request object in ctx.extras
- Warning Workspaces can only be enabled in private projects. HOT 3
- Detect subscription successfully started
- Errors during streaming subscriptions aren't properly handled or emitted HOT 1
- httpOnly cookie authentication
- Promises getting rejected with non-Error objects HOT 2
- Some subscriptions remain open after a websocket has been closed HOT 2
- Getting "Internal error occurred during message handling. Please check your implementation." after following recipe
- Clarify Contribution Policy
- Clients can be sent an `Error` message after cancellation. HOT 2
- How to avoid logging of hole object in graphql-ws?
- Consider migrating to crossws
- Make code and reason optional when closing a connection HOT 2
- fastify websockets breaking change HOT 4
- ERROR CREATING WsLink
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-ws.