PartiallyCertainSelectionResult type

Result shape when some selection entries are single field literals and others are unions. Known fields are required and the rest are optional.

type PartiallyCertainSelectionResult<T, TFields> = MergeProjection<Simplify<GraphQLPick<T, Exclude<Extract<keyof T, CertainSelectionFields<TFields>>, NestedSelectionRoots<TFields>>> & {[K in keyof T as (K extends NestedSelectionRoots<TFields> ? (K extends CertainSelectionFields<TFields> | NestedSelectionRoots<readonly CertainSelectionFields<...>[]> ? K : never) : never)]: ProjectNestedValue<T[K], NestedSelectionKeys<readonly CertainSelectionFields<TFields>[], K>>;}>, UncertainSelectionResult<T, TFields>>