3 ms·
But what about optimistic UI updates or offline support in the client. The frontend has no notion of the relationships between the entities, which means you wil
by vaughan 6y ago
But what about optimistic UI updates or offline support in the client. The frontend has no notion of the relationships between the entities, which means you will be making a lot more queries than you need to, or just ignoring optimistic updates (we may be fine for some apps).
- rattray 6y agoAs you note in your article, Apollo's gql client has optimistic UI, but it looks like a pain. The Apollo cache seems to be powerful enough normalize the way you want, perhaps with some extra code: https://www.apollographql.com/docs/react/caching/cache-configuration/ https://www.apollographql.com/docs/react/caching/cache-confi... Apollo also claims support for cache persistence, eg to localstorage: https://www.apollographql.com/docs/react/caching/advanced-topics/#cache-persistence https://www.apollographql.com/docs/react/caching/advanced-to... I haven't used Apollo myself so maybe it's not as usable or powerful as it claims to be.