vadimdemedes / draqula

🧛 GraphQL client for minimalistic React apps
https://draqulajs.com
771 stars 15 forks source link

Optimistic UI #26

Open FarazPatankar opened 4 years ago

FarazPatankar commented 4 years ago

Hey,

So I recently started using Draqula and love how simple everything is, especially the aggressive invalidation and re-fetching.

The one thing I miss from Apollo is the optimistic UI feature that they have. A have a very basic habit tracking app and there is a noticeable delay for when my users complete a habit to it being marked complete. With something like optimistic UI, this was almost instant as I could send an expected response with my request and it'd update the UI accordingly.

Is this a planned feature by any chance? I'd be more than happy to help implement it if it is. And if not, any ideas on what I can do to simulate a near real-time response?

FarazPatankar commented 4 years ago

@vadimdemedes have you had a chance to look at this?

For now, I've done my own implementation of this using setState but it'd be great if this could be handled by Draqula itself as my current implementation causes extra re-renders.

FarazPatankar commented 4 years ago

@vadimdemedes checking in again.

I have a new project that I am starting this week and I don't have any need for subscriptions. I was considering using Draqula again but I am not sure if you're going to continue to work on this project. Could you please respond and let me know?

And if you aren't, are there any other viable alternatives that are similar to Draqula?