Fork me on GitHub
#graphql
<
2018-08-23
>
myguidingstar17:08:54

how do I implement graphql subscription with fallback to polling when websocket is not available?

hlship15:08:12

I'm sorry no ones gotten back to you. I built the subscription support on top of Pedestal and made it work like Apollo to the best of my understanding ... but after that, I haven't gone very deep as we are yet to use subscriptions on Walmart (and our byzantine routers and load balancers may get in the way, regardless).

myguidingstar16:08:35

@U04VDKC4G thanks. My approach now is to establish a sente connection and handle the graphql string with executor/invoke-streamer

oliy08:08:10

@U0E2YV1UZ i have a plan for implementing this in re-graph, i don't know if apollo client already supports this

oliy08:08:33

if i understand correctly you are asking about how to make the client behave this way, not the server?

myguidingstar18:08:40

@U076R6N1L I think both client and server must implement something

myguidingstar18:08:24

it's like the library sente but for graphql subscription

oliy10:09:30

The server will need to serve both subscriptions and normal queries, yes, but lacinia-pedestal does this

myguidingstar15:09:41

@U076R6N1L too bad we use Ring and can't switch to pedestal momentarily