major
major copied to clipboard
Cache type considerations
For us to have a strongly typed, normalized cache:
- Types must be partials like
Partial<ObjectType>in typescript - Relationships need to be replaced with references, possibly with associated type aware getters. E.g:
Reference<Task> _taskId;
Task get referencedTask => _dereference(_taskId);
This means we definitely need to generate separate models if we want a strongly typed cache.