vors
vors3y ago

Is there a story for offline workflow

Is there a story for offline workflow?
6 Replies
nipunn
nipunn3y ago
Essentially, your mutations or actions are allowed to schedule work to occur in the future. Automatically recurring work is in the works - but right now as a workaround you can have your scheduled job schedule another job at the end.
vors
vorsOP3y ago
Thank you Nipunn! That's also very useful. I was thinking about a different offline: when connection is lost on the client and we are failing to execute a mutation (i.e. send a chat message), would there be any kind of story about still seeing the mutation results in the local queries?
ballingt
ballingt3y ago
when connection is lost on the client and we are failing to execute a mutation (i.e. send a chat message), would there be any kind of story about still seeing the mutation results in the local
Of the degrees of offline support I'd say Convex supports intermittent connections. - Optimistic updates let you modify query results arbitrarily, reducing perceived latency and making the app continue to work during a network disconnect https://docs.convex.dev/using/optimistic-updates - Mutations won't be failed if the client is offline temporarily: they'll be stored in memory, and an "You have unsaved work" alert will pop up if the user tries to close the tab before the mutations have been confirmed received
Optimistic Updates | Convex Developer Hub
Even though Convex queries are completely reactive, sometimes you'll want to
ballingt
ballingt3y ago
For what you're asking about here optimistic updates sound perfect! I just don't want to call it full offline support. As you and I know too well from DBX client work real offline support gets complicated, but it's something we think about for the future.
vors
vorsOP3y ago
Amazing, that's exactly what I was hoping for! Sorry for not RTFM. Btw, love the documentation all around. Very concise.

Did you find this page helpful?