Fields, references and when to split a type
11 min
The question is always the same: does this thing have an identity of its own?
Split it out when it is reused
An author appears on many posts and has a name, a bio and a photo. That is an entity, so it gets its own type and posts point at it with a reference. Change the bio once, every post updates.
Keep it inline when it is not
A post's excerpt belongs to exactly one post. Giving it a type of its own buys nothing and costs an extra hop on every read.
Depth costs
Resolving references is not free — each level of include is another lookup. Three levels
deep usually means the model wants restructuring, not a bigger include.