Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix typings for PartialModelGraph and nullable fields
Handle `| null` unions properly. (e.g. for nullable `BelongsToOneRelations`). Before `PartialModelGraph` was converting `field: Model | null;` to `field?: Expression<Model | null>`, and typescript throws errors for graphs with partial sub-graphs for those nullable relations. (expecting full instance of the model class) Now it converts it properly to `field?: PartialModelGraph<Model> | null` 🎉
- Loading branch information