NestedSelectionResult type
The relationship fields of a selection result, each narrowed to the nested fields selected for it.
type NestedSelectionResult<T, TFields> = {
[K in keyof T as K extends NestedSelectionRoots<TFields>
? K
: never]: ProjectNestedValue<T[K], NestedSelectionKeys<TFields, K>>
}