workers-graphql-server icon indicating copy to clipboard operation
workers-graphql-server copied to clipboard

Question: Realtime Updates supported

Open g3rd opened this issue 5 years ago • 6 comments

Does Cloudflare Workers' GraphQL Server allow for subscription / realtime updates?

g3rd avatar Aug 15 '19 20:08 g3rd

Hey @g3rd - we don't currently support it as the Workers platform doesn't have Websockets or anything along those lines.

You should be able to use the Apollo client's polling/refetching capabilities, I haven't tested it personally yet, but planning on trying it out at some point in the future. Let me know if you end up trying it!

kristianfreeman avatar Aug 16 '19 20:08 kristianfreeman

I'll be giving is a shot soon, and keep you posted!

g3rd avatar Aug 21 '19 12:08 g3rd

@g3rd please keep us updated. iot needs real time and subscriptions

@signalnerve is there a delay initially which is typical for serverless functions at the initial bootup? Usually cloud function vendors tell you to run a hack to preserve the function indefinitely.

Niko-La avatar Aug 29 '19 22:08 Niko-La

Seems like subscriptions might be possible now with the introduction of durable objects? https://blog.cloudflare.com/introducing-workers-durable-objects/

Would love to see this starter extended with subscriptions, or at least some guidelines on best practices.

lewisl9029 avatar Jan 11 '21 00:01 lewisl9029

Seems like subscriptions might be possible now with the introduction of durable objects? https://blog.cloudflare.com/introducing-workers-durable-objects/

Would love to see this starter extended with subscriptions, or at least some guidelines on best practices.

Indeed! Since this issue was created Durable Objects have been birthed into existence :) I'm going to take some time this year to look at Durable Objects and if it will allow us to do subscriptions, that would be amazing! No updates at the moment but when we open DO up for public beta, I'd love to have someone else tackle it too if they're interested 👍

kristianfreeman avatar Jan 15 '21 16:01 kristianfreeman

Hey @signalnerve ! Any updates on this? Especially regarding the latest websocket update?

AlaaZorkane avatar Apr 26 '21 20:04 AlaaZorkane