From 8f78882ee1632fa68a80bd10ccb7f204c6fc73ac Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Tue, 19 Nov 2024 14:09:35 -0500 Subject: [PATCH] improve(document-builder): simplification of all output cases! (#1269) --- src/client/handleOutput.ts | 66 +- src/documentBuilder/InferResult/__.test-d.ts | 6 +- src/documentBuilder/Simplify.test-d.ts | 20 + src/documentBuilder/Simplify.ts | 18 + src/documentBuilder/_.js | 1 + src/documentBuilder/__.ts | 1 + .../requestMethods/document.ts | 8 +- .../requestMethods/requestMethods.test-d.ts | 1 + src/entrypoints/utilities-for-generated.ts | 11 +- src/extensions/Introspection/Introspection.ts | 3 +- .../fixture/graffle/modules/methods-root.ts | 676 ++++++++--------- .../__snapshots__/generate.test.ts.snap | 687 ++++++++---------- src/generator/generators/MethodsRoot.ts | 17 +- src/lib/prelude.test-d.ts | 12 +- src/lib/prelude.ts | 50 +- .../graffle/modules/methods-root.ts | 676 ++++++++--------- .../graffle/modules/methods-root.ts | 49 +- .../pokemon/graffle/modules/methods-root.ts | 130 ++-- .../graffle/modules/methods-root.ts | 45 +- website/graffle/modules/methods-root.ts | 130 ++-- 20 files changed, 1106 insertions(+), 1501 deletions(-) create mode 100644 src/documentBuilder/Simplify.test-d.ts create mode 100644 src/documentBuilder/Simplify.ts create mode 100644 src/documentBuilder/_.js create mode 100644 src/documentBuilder/__.ts diff --git a/src/client/handleOutput.ts b/src/client/handleOutput.ts index de59d2c04..a38776774 100644 --- a/src/client/handleOutput.ts +++ b/src/client/handleOutput.ts @@ -1,4 +1,6 @@ import type { GraphQLError } from 'graphql' +import type { Simplify } from 'type-fest' +import type { SimplifyDeepExcept } from '../documentBuilder/Simplify.js' import type { RunTypeHookOnRequestResult } from '../extension/extension.js' import { Errors } from '../lib/errors/__.js' import type { Grafaid } from '../lib/grafaid/__.js' @@ -109,7 +111,15 @@ export const handleOutput = ( // dprint-ignore export type HandleOutputGraffleRootField<$Context extends Context, $Data extends SomeObjectData, $RootFieldName extends string> = - HandleOutputGraffleRootField_Data>, $RootFieldName> + HandleOutputGraffleRootField_Data< + ExcludeNull< + HandleOutput< + $Context, + SimplifyDeepExcept<$Context['scalars']['typesDecoded'], $Data> + > + >, + $RootFieldName + > // dprint-ignore type HandleOutputGraffleRootField_Data<$Output extends Error | SomeObjectData | GraffleExecutionResultEnvelope, $RootFieldName extends string> = @@ -119,7 +129,13 @@ type HandleOutputGraffleRootField_Data<$Output extends Error | SomeObjectData | // dprint-ignore export type HandleOutput<$Context extends Context, $Data extends SomeObjectData> = - HandleOutput_Extensions<$Context, Envelope<$Context, $Data>> + HandleOutput_Extensions< + $Context, + Envelope< + $Context, + SimplifyDeepExcept<$Context['scalars']['typesDecoded'], $Data> + > + > type HandleOutput_Extensions<$Context extends Context, $Envelope extends GraffleExecutionResultEnvelope> = HandleOutput_ErrorsReturn< @@ -168,26 +184,32 @@ type ConfigResolveOutputErrorChannel<$Context extends Context, $Channel extends // dprint-ignore // todo use ObjMap for $Data -export type Envelope<$Context extends Context, $Data = unknown, $Errors extends ReadonlyArray = ReadonlyArray> = - & { - data?: $Data | null - extensions?: ObjMap - } - & ( - $Context['config']['transport']['type'] extends 'http' - ? { response: Response } - : {} - ) - // todo remove use of errors type variable. Rely only on $Config. - & ( - $Errors extends [] - ? {} - : IsEnvelopeWithoutErrors<$Context> extends true - ? {} - : { - errors?: ReadonlyArray - } - ) +export type Envelope< + $Context extends Context, + $Data = unknown, + $Errors extends ReadonlyArray = ReadonlyArray, +> = + Simplify< + & { + data?: $Data | null + extensions?: ObjMap + } + & ( + $Context['config']['transport']['type'] extends 'http' + ? { response: Response } + : {} + ) + // todo remove use of errors type variable. Rely only on $Config. + & ( + $Errors extends [] + ? {} + : IsEnvelopeWithoutErrors<$Context> extends true + ? {} + : { + errors?: ReadonlyArray + } + ) + > type ObjMap = { [key: string]: T diff --git a/src/documentBuilder/InferResult/__.test-d.ts b/src/documentBuilder/InferResult/__.test-d.ts index 75bb08c2f..f4b540320 100644 --- a/src/documentBuilder/InferResult/__.test-d.ts +++ b/src/documentBuilder/InferResult/__.test-d.ts @@ -3,11 +3,13 @@ import type { db } from '../../../tests/_/schemas/db.js' import type { Schema } from '../../../tests/_/schemas/kitchen-sink/graffle/modules/schema.js' import type * as SelectionSets from '../../../tests/_/schemas/kitchen-sink/graffle/modules/selection-sets.js' import { assertEqual } from '../../lib/assert-equal.js' -import type { SimplifyDeep } from '../../lib/prelude.js' import type { Registry } from '../../types/Schema/nodes/Scalar/helpers.js' +import type { DocumentBuilder } from '../__.js' import type { InferResult } from './__.js' -type $<$SelectionSet extends SelectionSets.Query> = SimplifyDeep> +type $<$SelectionSet extends SelectionSets.Query> = DocumentBuilder.SimplifyDeep< + InferResult.OperationQuery<$SelectionSet, Schema> +> type $Registry = Registry.AddScalar diff --git a/src/documentBuilder/Simplify.test-d.ts b/src/documentBuilder/Simplify.test-d.ts new file mode 100644 index 000000000..385eb6855 --- /dev/null +++ b/src/documentBuilder/Simplify.test-d.ts @@ -0,0 +1,20 @@ +import { assertEqual } from '../lib/assert-equal.js' +import type { SimplifyDeep, SimplifyDeepExcept } from './Simplify.js' + +// dprint-ignore +{ + +assertEqual , {x:1|null}>() +assertEqual , null | {x:1}>() +assertEqual , null | {x?:1}>() +assertEqual , null | {x?:1|null}>() + +assertEqual , null | Date>() +assertEqual , {}>() +assertEqual , { a: Date }>() +assertEqual , { a: 1 }>() +assertEqual , { a: { b: Date } }>() +assertEqual , { a: { b: Date } }>() +assertEqual , { a: null | { b: Date } }>() + +} diff --git a/src/documentBuilder/Simplify.ts b/src/documentBuilder/Simplify.ts new file mode 100644 index 000000000..bd1484b50 --- /dev/null +++ b/src/documentBuilder/Simplify.ts @@ -0,0 +1,18 @@ +import type { IntrospectionQuery } from 'graphql' +import type { AnyAndUnknownToNever } from '../lib/prelude.js' + +export type SimplifyDeep = SimplifyDeepExcept + +// dprint-ignore +export type SimplifyDeepExcept<$ExcludeType, $Type> = + $Type extends any ? // distribute execution over $Type members + + // todo allow extensions to augment this list, with arbitrary types, not just custom scalars. + $Type extends AnyAndUnknownToNever<$ExcludeType> | IntrospectionQuery + ? $Type + : { + [$Key in keyof $Type]: + & SimplifyDeepExcept<$ExcludeType, $Type[$Key]> + & ({} | null) + } + : never diff --git a/src/documentBuilder/_.js b/src/documentBuilder/_.js new file mode 100644 index 000000000..6cc50c034 --- /dev/null +++ b/src/documentBuilder/_.js @@ -0,0 +1 @@ +export * from './Simplify.js' diff --git a/src/documentBuilder/__.ts b/src/documentBuilder/__.ts new file mode 100644 index 000000000..77cf9ea03 --- /dev/null +++ b/src/documentBuilder/__.ts @@ -0,0 +1 @@ +export * as DocumentBuilder from './_.js' diff --git a/src/documentBuilder/requestMethods/document.ts b/src/documentBuilder/requestMethods/document.ts index e46f84207..61d5e8744 100644 --- a/src/documentBuilder/requestMethods/document.ts +++ b/src/documentBuilder/requestMethods/document.ts @@ -4,7 +4,7 @@ import { type HandleOutput } from '../../client/handleOutput.js' import type { InferResult } from '../../documentBuilder/InferResult/__.js' import type { Select } from '../../documentBuilder/Select/__.js' import type { Schema } from '../../entrypoints/schema.js' -import type { IsTupleMultiple, SimplifyDeepExcept } from '../../lib/prelude.js' +import type { IsTupleMultiple } from '../../lib/prelude.js' // dprint-ignore export type DocumentRunner< @@ -18,9 +18,8 @@ export type DocumentRunner< const $Name extends string = $Params extends [] ? $$Name : $Params[0], >(...params: $Params) => Promise< - SimplifyDeepExcept< - $$Context['scalars']['typesDecoded'], - HandleOutput< + & ({} | null) + & HandleOutput< $$Context, InferResult.Operation< Select.Document.GetOperation<$$Document, $Name>, @@ -28,7 +27,6 @@ export type DocumentRunner< Select.Document.GetOperationType<$$Document, $Name> > > - > > } diff --git a/src/documentBuilder/requestMethods/requestMethods.test-d.ts b/src/documentBuilder/requestMethods/requestMethods.test-d.ts index 5939a98a5..82ebd3ed7 100644 --- a/src/documentBuilder/requestMethods/requestMethods.test-d.ts +++ b/src/documentBuilder/requestMethods/requestMethods.test-d.ts @@ -21,6 +21,7 @@ test(`query`, async () => { // scalar with required arguments expectTypeOf>().toEqualTypeOf<[input: Graffle.SelectionSets.Query.stringWithRequiredArg]>() // scalar custom + const result = await graffle.query.date() expectTypeOf(await graffle.query.date()).toMatchTypeOf() // scalar with explicit indicators // positive indicator diff --git a/src/entrypoints/utilities-for-generated.ts b/src/entrypoints/utilities-for-generated.ts index 9de94f48c..379417a2c 100644 --- a/src/entrypoints/utilities-for-generated.ts +++ b/src/entrypoints/utilities-for-generated.ts @@ -4,15 +4,8 @@ export type { ConfigGetOutputError, HandleOutput, HandleOutputGraffleRootField } export type { Config } from '../client/Settings/Config.js' export { type DocumentRunner } from '../documentBuilder/requestMethods/document.js' export * from '../documentBuilder/Select/__.js' -export { - type AssertExtendsObject, - type Exact, - type ExactNonEmpty, - type SimplifyDeep, - type SimplifyDeepExcept, - type SimplifyExcept, - type UnionExpanded, -} from '../lib/prelude.js' +export { type SimplifyDeep, type SimplifyDeepExcept } from '../documentBuilder/Simplify.js' +export { type AssertExtendsObject, type Exact, type ExactNonEmpty, type UnionExpanded } from '../lib/prelude.js' export { TypeFunction } from '../lib/type-function/__.js' export { type GlobalRegistry } from '../types/GlobalRegistry/GlobalRegistry.js' export { Schema } from '../types/Schema/__.js' diff --git a/src/extensions/Introspection/Introspection.ts b/src/extensions/Introspection/Introspection.ts index 16164fc50..0c2195a54 100644 --- a/src/extensions/Introspection/Introspection.ts +++ b/src/extensions/Introspection/Introspection.ts @@ -2,7 +2,6 @@ import { getIntrospectionQuery, type IntrospectionQuery } from 'graphql' import type { Context } from '../../client/context.js' import type { HandleOutput } from '../../client/handleOutput.js' import { createBuilderExtension, createExtension } from '../../entrypoints/extensionkit.js' -import type { SimplifyNullable } from '../../entrypoints/main.js' import type { Builder } from '../../lib/builder/__.js' import { type ConfigInput, createConfig } from './config.js' @@ -73,7 +72,7 @@ interface BuilderExtension extends Builder.Extension { } interface BuilderExtension_<$Args extends Builder.Extension.Parameters> { - introspect: () => Promise>> + introspect: () => Promise<(null | {}) & HandleOutput<$Args['context'], IntrospectionQuery>> } const knownPotentiallyUnsupportedFeatures = [`inputValueDeprecation`, `oneOf`] as const diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/methods-root.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/methods-root.ts index 897743b7a..5d2c83e71 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/methods-root.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/methods-root.ts @@ -7,47 +7,40 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Query' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Query' }, + '__typename' > > InputObjectNested: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'InputObjectNested' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'InputObjectNested' > > InputObjectNestedNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'InputObjectNestedNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'InputObjectNestedNonNull' > > /** @@ -56,104 +49,88 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { abcEnum: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.abcEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'abcEnum' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'abcEnum' > > argInputObjectCircular: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'argInputObjectCircular' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'argInputObjectCircular' > > date: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.date<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'date' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'date' > > dateArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArg' > > dateArgInputObject: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgInputObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgInputObject' > > dateArgList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgList' > > dateArgNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNull' > > dateArgNonNullList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNullList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNullList' > > @@ -163,377 +140,319 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.dateArgNonNullListNonNull<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNullListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNullListNonNull' > > dateInterface1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateInterface1<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateInterface1' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateInterface1' > > dateList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateList' > > dateListList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateListList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateListList' > > dateListNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateListNonNull' > > dateNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateNonNull' > > dateObject1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateObject1<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateObject1' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateObject1' > > dateUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateUnion' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateUnion' > > error: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.error<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'error' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'error' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > interface: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$interface<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interface' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interface' > > interfaceNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interfaceNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interfaceNonNull' > > interfaceWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interfaceWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interfaceWithArgs' > > listInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listInt<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listInt' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listInt' > > listIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listIntNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listIntNonNull' > > listListInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListInt<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listListInt' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listListInt' > > listListIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listListIntNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listListIntNonNull' > > lowerCaseUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'lowerCaseUnion' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'lowerCaseUnion' > > object: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$object<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'object' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'object' > > objectList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectList' > > objectListNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectListNonNull' > > objectNested: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectNested' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectNested' > > objectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectNonNull' > > objectWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectWithArgs' > > result: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.result<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'result' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'result' > > resultNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.resultNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'resultNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'resultNonNull' > > string: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$string<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'string' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'string' > > stringWithArgEnum: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgEnum' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgEnum' > > @@ -543,13 +462,11 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithArgInputObject<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgInputObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgInputObject' > > @@ -559,16 +476,14 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithArgInputObjectRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery< - { stringWithArgInputObjectRequired: $SelectionSet }, - $$Schema.Schema<$Context['scalars']> - >, - 'stringWithArgInputObjectRequired' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery< + { stringWithArgInputObjectRequired: $SelectionSet }, + $$Schema.Schema<$Context['scalars']> + >, + 'stringWithArgInputObjectRequired' > > /** @@ -577,26 +492,22 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { stringWithArgs: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgs' > > stringWithListArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithListArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithListArg' > > @@ -606,91 +517,77 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithListArgRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithListArgRequired' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithListArgRequired' > > stringWithRequiredArg: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithRequiredArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithRequiredArg' > > unionFooBar: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBar<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBar' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBar' > > unionFooBarNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBarNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBarNonNull' > > unionFooBarWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBarWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBarWithArgs' > > unionObject: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObject<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionObject' > > unionObjectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionObjectNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionObjectNonNull' > > } @@ -699,50 +596,43 @@ export interface MutationMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationMutation< - $$Utilities.AssertExtendsObject<$SelectionSet>, - $$Schema.Schema<$Context['scalars']> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationMutation< + $$Utilities.AssertExtendsObject<$SelectionSet>, + $$Schema.Schema<$Context['scalars']> > > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Mutation' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Mutation' }, + '__typename' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > } diff --git a/src/generator/generator/__snapshots__/generate.test.ts.snap b/src/generator/generator/__snapshots__/generate.test.ts.snap index edb7f262f..157106e21 100644 --- a/src/generator/generator/__snapshots__/generate.test.ts.snap +++ b/src/generator/generator/__snapshots__/generate.test.ts.snap @@ -163,47 +163,40 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Query' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Query' }, + '__typename' > > InputObjectNested: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'InputObjectNested' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'InputObjectNested' > > InputObjectNestedNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'InputObjectNestedNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'InputObjectNestedNonNull' > > /** @@ -212,104 +205,88 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { abcEnum: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.abcEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'abcEnum' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'abcEnum' > > argInputObjectCircular: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'argInputObjectCircular' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'argInputObjectCircular' > > date: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.date<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'date' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'date' > > dateArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArg' > > dateArgInputObject: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgInputObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgInputObject' > > dateArgList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgList' > > dateArgNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNull' > > dateArgNonNullList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNullList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNullList' > > @@ -319,377 +296,319 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.dateArgNonNullListNonNull<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNullListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNullListNonNull' > > dateInterface1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateInterface1<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateInterface1' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateInterface1' > > dateList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateList' > > dateListList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateListList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateListList' > > dateListNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateListNonNull' > > dateNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateNonNull' > > dateObject1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateObject1<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateObject1' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateObject1' > > dateUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateUnion' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateUnion' > > error: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.error<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'error' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'error' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > interface: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$interface<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interface' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interface' > > interfaceNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interfaceNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interfaceNonNull' > > interfaceWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interfaceWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interfaceWithArgs' > > listInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listInt<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listInt' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listInt' > > listIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listIntNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listIntNonNull' > > listListInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListInt<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listListInt' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listListInt' > > listListIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listListIntNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listListIntNonNull' > > lowerCaseUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'lowerCaseUnion' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'lowerCaseUnion' > > object: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$object<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'object' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'object' > > objectList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectList' > > objectListNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectListNonNull' > > objectNested: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectNested' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectNested' > > objectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectNonNull' > > objectWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectWithArgs' > > result: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.result<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'result' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'result' > > resultNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.resultNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'resultNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'resultNonNull' > > string: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$string<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'string' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'string' > > stringWithArgEnum: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgEnum' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgEnum' > > @@ -699,13 +618,11 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithArgInputObject<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgInputObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgInputObject' > > @@ -715,16 +632,14 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithArgInputObjectRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery< - { stringWithArgInputObjectRequired: $SelectionSet }, - $$Schema.Schema<$Context['scalars']> - >, - 'stringWithArgInputObjectRequired' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery< + { stringWithArgInputObjectRequired: $SelectionSet }, + $$Schema.Schema<$Context['scalars']> + >, + 'stringWithArgInputObjectRequired' > > /** @@ -733,26 +648,22 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { stringWithArgs: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgs' > > stringWithListArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithListArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithListArg' > > @@ -762,91 +673,77 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithListArgRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithListArgRequired' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithListArgRequired' > > stringWithRequiredArg: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithRequiredArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithRequiredArg' > > unionFooBar: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBar<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBar' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBar' > > unionFooBarNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBarNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBarNonNull' > > unionFooBarWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBarWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBarWithArgs' > > unionObject: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObject<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionObject' > > unionObjectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionObjectNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionObjectNonNull' > > } @@ -855,50 +752,43 @@ export interface MutationMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationMutation< - $$Utilities.AssertExtendsObject<$SelectionSet>, - $$Schema.Schema<$Context['scalars']> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationMutation< + $$Utilities.AssertExtendsObject<$SelectionSet>, + $$Schema.Schema<$Context['scalars']> > > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Mutation' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Mutation' }, + '__typename' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > } @@ -7731,8 +7621,7 @@ export interface QueryRootMethods<$Context extends $$Utilities.Context> { $$SelectionSets.QueryRoot<$Context["scalars"]> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], + (null | {}) & $$Utilities.HandleOutput< $Context, InferResult.OperationQuery< @@ -7740,16 +7629,14 @@ export interface QueryRootMethods<$Context extends $$Utilities.Context> { $$Schema.Schema<$Context["scalars"]> > > - > >; __typename: () => Promise< - $$Utilities.SimplifyDeep< + (null | {}) & $$Utilities.HandleOutputGraffleRootField< $Context, { __typename: "QueryRoot" }, "__typename" > - > >; id: <$SelectionSet>( @@ -7758,8 +7645,7 @@ export interface QueryRootMethods<$Context extends $$Utilities.Context> { $$SelectionSets.QueryRoot.id<$Context["scalars"]> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], + (null | {}) & $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery< @@ -7768,7 +7654,6 @@ export interface QueryRootMethods<$Context extends $$Utilities.Context> { >, "id" > - > >; } diff --git a/src/generator/generators/MethodsRoot.ts b/src/generator/generators/MethodsRoot.ts index 352da48f1..2a30e1b94 100644 --- a/src/generator/generators/MethodsRoot.ts +++ b/src/generator/generators/MethodsRoot.ts @@ -54,23 +54,20 @@ const renderRootType = createCodeGenerator<{ node: Grafaid.Schema.ObjectType }>( export interface ${node.name}Methods<$Context extends ${identifiers.$$Utilities}.Context> { $batch: <$SelectionSet>(selectionSet: ${identifiers.$$Utilities}.Exact<$SelectionSet, ${identifiers.$$SelectionSets}.${node.name}<$Context['scalars']>>) => Promise< - ${identifiers.$$Utilities}.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - ${identifiers.$$Utilities}.HandleOutput< + & (null | {}) + & ${identifiers.$$Utilities}.HandleOutput< $Context, InferResult.Operation${capitalizeFirstLetter(operationType)}<${identifiers.$$Utilities}.AssertExtendsObject<$SelectionSet>, ${identifiers.$$Schema}.${identifiers.Schema}<$Context['scalars']>> > - > > __typename: () => Promise< - ${identifiers.$$Utilities}.SimplifyDeep< - ${identifiers.$$Utilities}.HandleOutputGraffleRootField< + & (null | {}) + & ${identifiers.$$Utilities}.HandleOutputGraffleRootField< $Context, { __typename: '${node.name}' }, '__typename' > - > > ${fieldMethods} }`) @@ -91,14 +88,12 @@ const renderFieldMethods = createCodeGenerator<{ node: Grafaid.Schema.ObjectType code(` ${field.name}: <$SelectionSet>(selectionSet${isOptional ? `?` : ``}: ${identifiers.$$Utilities}.Exact<$SelectionSet, ${identifiers.$$SelectionSets}.${renderName(node)}.${renderName(field)}<$Context['scalars']>>) => Promise< - ${identifiers.$$Utilities}.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - ${identifiers.$$Utilities}.HandleOutputGraffleRootField< + & (null | {}) + & ${identifiers.$$Utilities}.HandleOutputGraffleRootField< $Context, InferResult.Operation${capitalizeFirstLetter(operationType)}<{ ${field.name}: $SelectionSet}, ${identifiers.$$Schema}.${identifiers.Schema}<$Context['scalars']>>, '${field.name}' > - > > `) } diff --git a/src/lib/prelude.test-d.ts b/src/lib/prelude.test-d.ts index 6c53c50e0..9c55dcdfb 100644 --- a/src/lib/prelude.test-d.ts +++ b/src/lib/prelude.test-d.ts @@ -1,18 +1,8 @@ import { assertEqual } from './assert-equal.js' -import { type OmitKeysWithPrefix, type SimplifyDeepExcept, type ToParameters, type Tuple } from './prelude.js' +import { type OmitKeysWithPrefix, type ToParameters, type Tuple } from './prelude.js' // dprint-ignore { - - -assertEqual , null | Date>() -assertEqual , {}>() -assertEqual , { a: Date }>() -assertEqual , { a: 1 }>() -assertEqual , { a: { b: Date } }>() -assertEqual , { a: { b: Date } }>() -assertEqual , { a: null | { b: Date } }>() - // assertEqual, true>() // assertEqual, true>() // assertEqual , false>() diff --git a/src/lib/prelude.ts b/src/lib/prelude.ts index 4786f5d9f..754897d79 100644 --- a/src/lib/prelude.ts +++ b/src/lib/prelude.ts @@ -759,52 +759,6 @@ type IsAnyUnionMemberExtends_ = : never : never -// todo move these into DB lib -// dprint-ignore - -export type SimplifyExcept<$ExcludeType, $Type> = - IsAny<$ExcludeType> extends true - ? Simplify<$Type> - : $Type extends $ExcludeType - ? $Type - : {[TypeKey in keyof $Type]: $Type[TypeKey]} - -export type SimplifyDeep = SimplifyDeepExcept - -// dprint-ignore -export type SimplifyDeepExcept<$ExcludeType, $Type> = - IsExtendsExclude | Response | Error, $Type> extends true - ? $Type - : | ( - SimplifyDeepExcept_ | Response | Error, $Type> - & {} - ) - | ( - null extends $Type - ? null - : never - ) -// | ( -// undefined extends $Type -// ? undefined -// : never -// ) - -// dprint-ignore -type SimplifyDeepExcept_<$ExcludeType, $Type> = - $Type extends object - ? & { - [$Key in keyof $Type]: SimplifyDeepExcept<$ExcludeType, $Type[$Key]> - } - & {} - : $Type - -// dprint-ignore -type IsExtendsExclude<$ExcludeType, $Type> = - IsAny<$ExcludeType> extends false - ? IsAnyUnionMemberExtends<$Type, $ExcludeType> extends true - ? true - : false - : false - export type AnyAndUnknownToNever = IsAny extends true ? never : IsUnknown extends true ? never : T + +export type t = T extends null ? {} | null : {} diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts b/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts index d23b624f5..8a25dfe72 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts @@ -7,47 +7,40 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Query' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Query' }, + '__typename' > > InputObjectNested: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'InputObjectNested' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'InputObjectNested' > > InputObjectNestedNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'InputObjectNestedNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'InputObjectNestedNonNull' > > /** @@ -56,104 +49,88 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { abcEnum: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.abcEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'abcEnum' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'abcEnum' > > argInputObjectCircular: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'argInputObjectCircular' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'argInputObjectCircular' > > date: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.date<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'date' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'date' > > dateArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArg' > > dateArgInputObject: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgInputObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgInputObject' > > dateArgList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgList' > > dateArgNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNull' > > dateArgNonNullList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNullList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNullList' > > @@ -163,377 +140,319 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.dateArgNonNullListNonNull<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateArgNonNullListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateArgNonNullListNonNull' > > dateInterface1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateInterface1<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateInterface1' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateInterface1' > > dateList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateList' > > dateListList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateListList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateListList' > > dateListNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateListNonNull' > > dateNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateNonNull' > > dateObject1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateObject1<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateObject1' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateObject1' > > dateUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'dateUnion' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'dateUnion' > > error: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.error<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'error' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'error' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > interface: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$interface<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interface' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interface' > > interfaceNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interfaceNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interfaceNonNull' > > interfaceWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'interfaceWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'interfaceWithArgs' > > listInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listInt<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listInt' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listInt' > > listIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listIntNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listIntNonNull' > > listListInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListInt<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listListInt' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listListInt' > > listListIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'listListIntNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'listListIntNonNull' > > lowerCaseUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'lowerCaseUnion' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'lowerCaseUnion' > > object: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$object<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'object' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'object' > > objectList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectList<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectList' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectList' > > objectListNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectListNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectListNonNull' > > objectNested: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectNested' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectNested' > > objectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectNonNull' > > objectWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'objectWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'objectWithArgs' > > result: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.result<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'result' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'result' > > resultNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.resultNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'resultNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'resultNonNull' > > string: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$string<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'string' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'string' > > stringWithArgEnum: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgEnum' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgEnum' > > @@ -543,13 +462,11 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithArgInputObject<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgInputObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgInputObject' > > @@ -559,16 +476,14 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithArgInputObjectRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery< - { stringWithArgInputObjectRequired: $SelectionSet }, - $$Schema.Schema<$Context['scalars']> - >, - 'stringWithArgInputObjectRequired' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery< + { stringWithArgInputObjectRequired: $SelectionSet }, + $$Schema.Schema<$Context['scalars']> + >, + 'stringWithArgInputObjectRequired' > > /** @@ -577,26 +492,22 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { stringWithArgs: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithArgs' > > stringWithListArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithListArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithListArg' > > @@ -606,91 +517,77 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $$SelectionSets.Query.stringWithListArgRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithListArgRequired' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithListArgRequired' > > stringWithRequiredArg: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'stringWithRequiredArg' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'stringWithRequiredArg' > > unionFooBar: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBar<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBar' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBar' > > unionFooBarNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBarNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBarNonNull' > > unionFooBarWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionFooBarWithArgs' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionFooBarWithArgs' > > unionObject: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObject<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionObject' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionObject' > > unionObjectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'unionObjectNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'unionObjectNonNull' > > } @@ -699,50 +596,43 @@ export interface MutationMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationMutation< - $$Utilities.AssertExtendsObject<$SelectionSet>, - $$Schema.Schema<$Context['scalars']> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationMutation< + $$Utilities.AssertExtendsObject<$SelectionSet>, + $$Schema.Schema<$Context['scalars']> > > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Mutation' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Mutation' }, + '__typename' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > } diff --git a/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts b/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts index 30c8045f5..510a890ea 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts @@ -7,50 +7,43 @@ export interface MutationMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationMutation< - $$Utilities.AssertExtendsObject<$SelectionSet>, - $$Schema.Schema<$Context['scalars']> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationMutation< + $$Utilities.AssertExtendsObject<$SelectionSet>, + $$Schema.Schema<$Context['scalars']> > > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Mutation' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Mutation' }, + '__typename' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > } diff --git a/tests/_/schemas/pokemon/graffle/modules/methods-root.ts b/tests/_/schemas/pokemon/graffle/modules/methods-root.ts index 2b3477c54..a389f663f 100644 --- a/tests/_/schemas/pokemon/graffle/modules/methods-root.ts +++ b/tests/_/schemas/pokemon/graffle/modules/methods-root.ts @@ -7,99 +7,84 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Query' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Query' }, + '__typename' > > battles: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.battles<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ battles: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'battles' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ battles: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'battles' > > beings: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.beings<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ beings: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'beings' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ beings: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'beings' > > pokemonByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemonByName<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ pokemonByName: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'pokemonByName' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ pokemonByName: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'pokemonByName' > > pokemons: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemons<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ pokemons: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'pokemons' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ pokemons: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'pokemons' > > trainerByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainerByName<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ trainerByName: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'trainerByName' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ trainerByName: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'trainerByName' > > trainers: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainers<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ trainers: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'trainers' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ trainers: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'trainers' > > } @@ -108,37 +93,32 @@ export interface MutationMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationMutation< - $$Utilities.AssertExtendsObject<$SelectionSet>, - $$Schema.Schema<$Context['scalars']> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationMutation< + $$Utilities.AssertExtendsObject<$SelectionSet>, + $$Schema.Schema<$Context['scalars']> > > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Mutation' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Mutation' }, + '__typename' > > addPokemon: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.addPokemon<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ addPokemon: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'addPokemon' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ addPokemon: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'addPokemon' > > } diff --git a/tests/_/schemas/query-only/graffle/modules/methods-root.ts b/tests/_/schemas/query-only/graffle/modules/methods-root.ts index c1e8b9442..afcf08841 100644 --- a/tests/_/schemas/query-only/graffle/modules/methods-root.ts +++ b/tests/_/schemas/query-only/graffle/modules/methods-root.ts @@ -7,47 +7,40 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context['scalars']>> > > __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: 'Query' }, - '__typename' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: 'Query' }, + '__typename' > > id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'id' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'id' > > idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context['scalars']['typesDecoded'], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, - 'idNonNull' - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, + 'idNonNull' > > } diff --git a/website/graffle/modules/methods-root.ts b/website/graffle/modules/methods-root.ts index 89499522e..bacfcdd35 100644 --- a/website/graffle/modules/methods-root.ts +++ b/website/graffle/modules/methods-root.ts @@ -7,99 +7,84 @@ export interface QueryMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context["scalars"]>> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationQuery<$$Utilities.AssertExtendsObject<$SelectionSet>, $$Schema.Schema<$Context["scalars"]>> > >; __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: "Query" }, - "__typename" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: "Query" }, + "__typename" > >; battles: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.battles<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ battles: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, - "battles" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ battles: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, + "battles" > >; beings: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.beings<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ beings: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, - "beings" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ beings: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, + "beings" > >; pokemonByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemonByName<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ pokemonByName: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, - "pokemonByName" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ pokemonByName: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, + "pokemonByName" > >; pokemons: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemons<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ pokemons: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, - "pokemons" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ pokemons: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, + "pokemons" > >; trainerByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainerByName<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ trainerByName: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, - "trainerByName" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ trainerByName: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, + "trainerByName" > >; trainers: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainers<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationQuery<{ trainers: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, - "trainers" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationQuery<{ trainers: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, + "trainers" > >; } @@ -108,37 +93,32 @@ export interface MutationMethods<$Context extends $$Utilities.Context> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutput< - $Context, - InferResult.OperationMutation< - $$Utilities.AssertExtendsObject<$SelectionSet>, - $$Schema.Schema<$Context["scalars"]> - > + & (null | {}) + & $$Utilities.HandleOutput< + $Context, + InferResult.OperationMutation< + $$Utilities.AssertExtendsObject<$SelectionSet>, + $$Schema.Schema<$Context["scalars"]> > > >; __typename: () => Promise< - $$Utilities.SimplifyDeep< - $$Utilities.HandleOutputGraffleRootField< - $Context, - { __typename: "Mutation" }, - "__typename" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + { __typename: "Mutation" }, + "__typename" > >; addPokemon: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.addPokemon<$Context["scalars"]>>, ) => Promise< - $$Utilities.SimplifyDeepExcept< - $Context["scalars"]["typesDecoded"], - $$Utilities.HandleOutputGraffleRootField< - $Context, - InferResult.OperationMutation<{ addPokemon: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, - "addPokemon" - > + & (null | {}) + & $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.OperationMutation<{ addPokemon: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, + "addPokemon" > >; }