UnwrapPayload<P>: {} extends P
    ? unknown
    : {
        [K in keyof P]: P[K] extends {
                composites: infer C;
                scalars: infer S;
            }[]
            ? (S & UnwrapPayload<C>)[]
            : P[K] extends {
                    composites: infer C;
                    scalars: infer S;
                } | null
                ? S & UnwrapPayload<C> | Select<P[K], null>
                : never
    }

Type Parameters

  • P