diff --git a/src/layers/3_ResultSet/infer/root.ts b/src/layers/3_ResultSet/infer/root.ts index c95c9304..761b965c 100644 --- a/src/layers/3_ResultSet/infer/root.ts +++ b/src/layers/3_ResultSet/infer/root.ts @@ -1,3 +1,4 @@ +import type { Simplify } from 'type-fest' import { AssertIsEqual, type ExcludeNull, type GetKeyOr, type StringKeyof } from '../../../lib/prelude.js' import type { TSError } from '../../../lib/TSError.js' import type { Schema } from '../../1_Schema/__.js' @@ -40,10 +41,10 @@ export type InferObject<$SelectionSet, $Schema extends SchemaIndex, $Node extend // todo what about when scalars wildcard is combined with other fields like relations? ? InferSelectScalarsWildcard<$SelectionSet, $Schema,$Node> : - ( + Simplify<( & InferSelectionNonSelectAlias<$SelectionSet, $Schema, $Node> & InferSelectionSelectAlias<$SelectionSet, $Schema, $Node> - ) + )> // dprint-ignore type InferSelectionNonSelectAlias<$SelectionSet , $Schema extends SchemaIndex, $Node extends Schema.Output.Object$2> = diff --git a/src/layers/6_client/handleOutput.ts b/src/layers/6_client/handleOutput.ts index 046e4a02..67383d97 100644 --- a/src/layers/6_client/handleOutput.ts +++ b/src/layers/6_client/handleOutput.ts @@ -169,7 +169,9 @@ type IfConfiguredGetOutputErrorReturns<$Config extends Config> = // dprint-ignore type IfConfiguredStripSchemaErrorsFromDataRootType<$Config extends Config, $Index extends SchemaIndex, $Data> = - { [$RootFieldName in keyof $Data]: IfConfiguredStripSchemaErrorsFromDataRootField<$Config, $Index, $Data[$RootFieldName]> } + Simplify<{ + [$RootFieldName in keyof $Data]: IfConfiguredStripSchemaErrorsFromDataRootField<$Config, $Index, $Data[$RootFieldName]> + }> // dprint-ignore type IfConfiguredStripSchemaErrorsFromDataRootField<$Config extends Config, $Index extends SchemaIndex, $Data> =