4 ms·
Terrific writeup - thanks for sharing. IMHO this is the most important item: "We have yet to solve caching GraphQL responses on the client." Mobile client-side
by jph 11y ago
Terrific writeup - thanks for sharing. IMHO this is the most important item: "We have yet to solve caching GraphQL responses on the client."
Mobile client-side caching and sync/refreshing (or client-side change push) is where users get big gains in perceived speed gains. Fielding's REST handles this well, in my experience, though it takes some work to get the resource granularity correct, especially as a mobile app's feature needs are changing.
In my experience it's often the case that the mobile app can benefit from Fielding's REST (with HATEOS) and from using resources that are mobile-specific and quite different than the out-of-the box server-side models that map 1:1 to database rows. As an example, the JSON API team describes how to nest resources efficiently and cacheably, and also send HATEOS links.
I'll be very interested to hear more about your next steps, including how you decide to do caching, puts, and any kind of pub/sub or equivalent. Thanks again!
- jacobwg 11y agoGlad you enjoyed it! As someone pointed out below, what we were doing before is not true REST, and we may have been able to solve our problem in other ways (HATEOS, "true REST", etc.) - we experimented with some HATEOS-esque URI templates early on, similar to how Github's API implements them, though personally I feel like I need to study more to understand true REST and HATEOS. I will definitely follow up with our findings as we progress towards solving our remaining challenges.