convoyinc / apollo-cache-hermes

A cache implementation for Apollo Client, tuned for performance
Other
483 stars 30 forks source link

Add better description of what a normalized graph cache is #383

Open jnak opened 6 years ago

jnak commented 6 years ago

In the design exploration, it is not clear how the normalize graph is different than the regular flat map.

The examples look exactly the same:

Would you mind updating the description of the normalized graph cache?

nevir commented 5 years ago

Yeah, let me try explaining here to see where I'm missing info:

The main difference is that in the second example, ROOT.posts[0] maps to the exact same javascript object as 1. Whereas in the first example, that mapping is represented by an intermediate object (the { __ref: 1 }). Does that clarify?