From 76c89942c705a61a62ba2c6d1bd6e65c7aac9827 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Sun, 27 Oct 2024 20:44:46 -0400 Subject: [PATCH] improve(document-builder): no simplify custom scalars (#1232) --- .../InferResult/OutputObject.ts | 9 +- src/documentBuilder/InferResult/__.test-d.ts | 4 +- .../SelectGraphQLMapper/toGraphQL.test.ts | 10 +- src/entrypoints/utilities-for-generated.ts | 2 +- src/extensions/CustomScalars/decode.test.ts | 12 +- src/extensions/CustomScalars/encode.test.ts | 6 +- .../fixture/graffle/modules/methods-root.ts | 162 +++++++++++------ .../__snapshots__/generate.test.ts.snap | 168 ++++++++++++------ src/generator/generators/MethodsRoot.ts | 6 +- .../generators/SelectionSets.test-d.ts | 4 +- .../client.rootMethods.test-d.ts | 4 +- .../requestMethods/client.rootMethods.test.ts | 46 +++-- src/lib/prelude.ts | 21 ++- src/types/Schema/nodes/Scalar/helpers.ts | 2 +- tests/_/fixtures/scalars.ts | 2 +- tests/_/helpers.ts | 4 +- .../graffle/modules/methods-root.ts | 162 +++++++++++------ .../graffle/modules/methods-root.ts | 9 +- .../pokemon/graffle/modules/methods-root.ts | 30 ++-- .../graffle/modules/methods-root.ts | 9 +- website/graffle/modules/methods-root.ts | 21 ++- website/pokemon/modules/methods-root.ts | 30 ++-- 22 files changed, 474 insertions(+), 249 deletions(-) diff --git a/src/documentBuilder/InferResult/OutputObject.ts b/src/documentBuilder/InferResult/OutputObject.ts index c7b49b240..5edcfc494 100644 --- a/src/documentBuilder/InferResult/OutputObject.ts +++ b/src/documentBuilder/InferResult/OutputObject.ts @@ -1,5 +1,4 @@ -import type { ConditionalSimplify } from 'type-fest/source/conditional-simplify.js' -import type { StringKeyof } from '../../lib/prelude.js' +import type { SimplifyExcept, StringKeyof } from '../../lib/prelude.js' import type { TSErrorDescriptive } from '../../lib/ts-error.js' import type { Schema } from '../../types/Schema/__.js' import type { Select } from '../Select/__.js' @@ -11,10 +10,10 @@ export type OutputObject<$SelectionSet, $Schema extends Schema, $Node extends Sc Select.SelectScalarsWildcard.IsSelectScalarsWildcard<$SelectionSet> extends true // todo what about when scalars wildcard is combined with other fields like relations? ? ScalarsWildcard<$SelectionSet, $Schema, $Node> - : ConditionalSimplify< + : SimplifyExcept< + $Schema['scalars']['typesDecoded'], & SelectionNonSelectAlias<$SelectionSet, $Schema, $Node> - & Alias<$Schema, $Node, $SelectionSet>, - $Schema['scalars']['typesDecoded'] + & Alias<$Schema, $Node, $SelectionSet> > type SelectionNonSelectAlias<$SelectionSet, $Schema extends Schema, $Node extends Schema.OutputObject> = { diff --git a/src/documentBuilder/InferResult/__.test-d.ts b/src/documentBuilder/InferResult/__.test-d.ts index 5a53e2cb9..30e7ec697 100644 --- a/src/documentBuilder/InferResult/__.test-d.ts +++ b/src/documentBuilder/InferResult/__.test-d.ts @@ -1,4 +1,4 @@ -import type { Date } from '../../../tests/_/fixtures/scalars.js' +import type { DateScalar } from '../../../tests/_/fixtures/scalars.js' 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' @@ -9,7 +9,7 @@ import type { PickSelectsPositiveIndicatorAndNotSelectAlias } from './OutputObje type $<$SelectionSet extends SelectionSets.Query> = InferResult.OperationQuery<$SelectionSet, Schema> -type $Registry = Registry.AddScalar +type $Registry = Registry.AddScalar type $WithDate<$SelectionSet extends SelectionSets.Query<$Registry>> = InferResult.OperationQuery< $SelectionSet, diff --git a/src/documentBuilder/SelectGraphQLMapper/toGraphQL.test.ts b/src/documentBuilder/SelectGraphQLMapper/toGraphQL.test.ts index 15636fe39..b70114052 100644 --- a/src/documentBuilder/SelectGraphQLMapper/toGraphQL.test.ts +++ b/src/documentBuilder/SelectGraphQLMapper/toGraphQL.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest' -import { Date } from '../../../tests/_/fixtures/scalars.js' +import { DateScalar } from '../../../tests/_/fixtures/scalars.js' import { db } from '../../../tests/_/schemas/db.js' import { schemaDrivenDataMap } from '../../../tests/_/schemas/kitchen-sink/graffle/modules/schema-driven-data-map.js' import type * as SelectionSets from '../../../tests/_/schemas/kitchen-sink/graffle/modules/selection-sets.js' @@ -15,7 +15,9 @@ type CasesDescriptiveQuery = [ ] const testEachQueryWithDescription = test.for.bind(test) -type QueryWithDate = SelectionSets.Query> +type QueryWithDate = SelectionSets.Query< + Schema.Scalar.Registry.AddScalar +> type CasesDescriptiveQueryWithCustomScalars = [ description: string, @@ -142,5 +144,5 @@ const customScalarWithCodecCases = testEachQueryWithDescriptionWithCustomScalars [`args - custom scalar - input object field` , { dateArgInputObject: { $: { input: { idRequired: ``, dateRequired: db.date0, date: db.date1 } } } }], [`args - custom scalar - nested input object field` , { InputObjectNested: { $: { input: { InputObject: { idRequired: ``, dateRequired: db.date0, date: db.date1 } } } } }], ]) -customScalarWithCodecCases(...tester({ variables: true, scalars: { Date } })) -customScalarWithCodecCases(...tester({ variables: false, scalars: { Date } })) +customScalarWithCodecCases(...tester({ variables: true, scalars: { Date: DateScalar } })) +customScalarWithCodecCases(...tester({ variables: false, scalars: { Date: DateScalar } })) diff --git a/src/entrypoints/utilities-for-generated.ts b/src/entrypoints/utilities-for-generated.ts index bee6e45ff..a59cb1356 100644 --- a/src/entrypoints/utilities-for-generated.ts +++ b/src/entrypoints/utilities-for-generated.ts @@ -8,7 +8,7 @@ export type { } from '../layers/6_client/handleOutput.js' export { type DocumentRunner } from '../layers/6_client/requestMethods/document.js' export type { Config } from '../layers/6_client/Settings/Config.js' -export { type Exact, type ExactNonEmpty, type UnionExpanded } from '../lib/prelude.js' +export { type Exact, type ExactNonEmpty, type SimplifyExcept, 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/CustomScalars/decode.test.ts b/src/extensions/CustomScalars/decode.test.ts index 4a30b0760..dd535254a 100644 --- a/src/extensions/CustomScalars/decode.test.ts +++ b/src/extensions/CustomScalars/decode.test.ts @@ -1,5 +1,5 @@ import { describe, expect } from 'vitest' -import { Date } from '../../../tests/_/fixtures/scalars.js' +import { DateScalar } from '../../../tests/_/fixtures/scalars.js' import { createResponse, test } from '../../../tests/_/helpers.js' import { db } from '../../../tests/_/schemas/db.js' import type { Graffle } from '../../../tests/_/schemas/kitchen-sink/graffle/__.js' @@ -9,7 +9,7 @@ import { Grafaid } from '../../lib/grafaid/__.js' import type { Schema } from '../../types/Schema/__.js' type QueryWithDate = Graffle.SelectionSets.Query< - Schema.Scalar.Registry.AddScalar + Schema.Scalar.Registry.AddScalar > type TestCase = [ @@ -26,7 +26,7 @@ const withBatch: TestCaseWith = [ {}, async ([_, query, responseData, expectedData], { fetch, kitchenSinkHttp: kitchenSink }) => { fetch.mockResolvedValueOnce(createResponse({ data: responseData })) - expect(await kitchenSink.scalar(Date).query.$batch(query)).toEqual(expectedData) + expect(await kitchenSink.scalar(DateScalar).query.$batch(query)).toEqual(expectedData) }, ] @@ -38,7 +38,7 @@ const withGqlDocument: TestCaseWith = [ const { document } = SelectionSetGraphqlMapper.toGraphQL( Select.Document.createDocumentNormalizedFromQuerySelection(query as any), ) - expect(await kitchenSink.scalar(Date).gql(document).send()).toEqual(expectedData) + expect(await kitchenSink.scalar(DateScalar).gql(document).send()).toEqual(expectedData) }, ] @@ -50,7 +50,7 @@ const withGqlString: TestCaseWith = [ const { document } = SelectionSetGraphqlMapper.toGraphQL( Select.Document.normalizeOrThrow({ query: { foo: query as any } }), ) - expect(await kitchenSink.scalar(Date).gql(Grafaid.Document.print(document)).send()).toEqual(expectedData) + expect(await kitchenSink.scalar(DateScalar).gql(Grafaid.Document.print(document)).send()).toEqual(expectedData) }, ] @@ -107,7 +107,7 @@ describe(`$batch`, () => { describe(`object field in union`, () => { testUnionCases(`%s`, async ([_, query, responseData, expectedData], { fetch, kitchenSinkHttp: kitchenSink }) => { fetch.mockResolvedValueOnce(createResponse({ data: responseData })) - expect(await kitchenSink.scalar(Date).query.$batch(query)).toEqual(expectedData) + expect(await kitchenSink.scalar(DateScalar).query.$batch(query)).toEqual(expectedData) }) }) }) diff --git a/src/extensions/CustomScalars/encode.test.ts b/src/extensions/CustomScalars/encode.test.ts index ef66225f0..e0e1a7d5a 100644 --- a/src/extensions/CustomScalars/encode.test.ts +++ b/src/extensions/CustomScalars/encode.test.ts @@ -1,5 +1,5 @@ import { expect } from 'vitest' -import { Date } from '../../../tests/_/fixtures/scalars.js' +import { DateScalar } from '../../../tests/_/fixtures/scalars.js' import { test } from '../../../tests/_/helpers.js' import { db } from '../../../tests/_/schemas/db.js' import type { Graffle } from '../../../tests/_/schemas/kitchen-sink/graffle/__.js' @@ -11,7 +11,7 @@ import { Grafaid } from '../../lib/grafaid/__.js' import type { Schema } from '../../types/Schema/__.js' type QueryWithDate = Graffle.SelectionSets.Query< - Schema.Scalar.Registry.AddScalar + Schema.Scalar.Registry.AddScalar > type TestCase = [ @@ -36,7 +36,7 @@ const testCases = test.for([ ]) testCases(`%s`, async ([_, query, expectedVariables], { kitchenSink }) => { - const g = kitchenSink.use(Spy()).scalar(Date) + const g = kitchenSink.use(Spy()).scalar(DateScalar) const { document, operationsVariables } = SelectionSetGraphqlMapper.toGraphQL( Select.Document.createDocumentNormalizedFromQuerySelection(query as any), { 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 3ce8ccc72..7cb7a7f76 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/methods-root.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/methods-root.ts @@ -7,7 +7,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -27,7 +28,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { InputObjectNested: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -39,7 +41,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { InputObjectNestedNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -53,7 +56,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { abcEnum: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.abcEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -65,7 +69,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { argInputObjectCircular: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -77,7 +82,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { date: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.date<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -89,7 +95,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -101,7 +108,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgInputObject: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -113,7 +121,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -125,7 +134,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -137,7 +147,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgNonNullList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -152,7 +163,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.dateArgNonNullListNonNull<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -164,7 +176,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateInterface1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateInterface1<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -176,7 +189,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -188,7 +202,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateListList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -200,7 +215,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateListNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -212,7 +228,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -224,7 +241,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateObject1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateObject1<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -236,7 +254,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -248,7 +267,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { error: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.error<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -260,7 +280,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -272,7 +293,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -284,7 +306,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interface: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$interface<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -296,7 +319,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interfaceNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -308,7 +332,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interfaceWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -320,7 +345,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listInt<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -332,7 +358,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -344,7 +371,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listListInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListInt<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -356,7 +384,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listListIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -368,7 +397,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { lowerCaseUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -380,7 +410,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { object: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$object<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -392,7 +423,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -404,7 +436,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectListNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -416,7 +449,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectNested: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -428,7 +462,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -440,7 +475,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -452,7 +488,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { result: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.result<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -464,7 +501,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { resultNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.resultNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -476,7 +514,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { string: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$string<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -488,7 +527,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithArgEnum: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -503,7 +543,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithArgInputObject<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -518,7 +559,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithArgInputObjectRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery< @@ -535,7 +577,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithArgs: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -547,7 +590,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithListArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -562,7 +606,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithListArgRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -574,7 +619,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithRequiredArg: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -586,7 +632,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBar: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBar<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -598,7 +645,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBarNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -610,7 +658,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBarWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -622,7 +671,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionObject: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObject<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -634,7 +684,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionObjectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -648,7 +699,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationMutation<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -668,7 +720,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -680,7 +733,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, diff --git a/src/generator/generator/__snapshots__/generate.test.ts.snap b/src/generator/generator/__snapshots__/generate.test.ts.snap index 8e23946a1..70f8e1f11 100644 --- a/src/generator/generator/__snapshots__/generate.test.ts.snap +++ b/src/generator/generator/__snapshots__/generate.test.ts.snap @@ -163,7 +163,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -183,7 +184,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { InputObjectNested: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -195,7 +197,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { InputObjectNestedNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -209,7 +212,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { abcEnum: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.abcEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -221,7 +225,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { argInputObjectCircular: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -233,7 +238,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { date: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.date<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -245,7 +251,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -257,7 +264,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgInputObject: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -269,7 +277,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -281,7 +290,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -293,7 +303,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgNonNullList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -308,7 +319,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.dateArgNonNullListNonNull<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -320,7 +332,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateInterface1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateInterface1<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -332,7 +345,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -344,7 +358,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateListList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -356,7 +371,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateListNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -368,7 +384,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -380,7 +397,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateObject1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateObject1<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -392,7 +410,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -404,7 +423,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { error: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.error<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -416,7 +436,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -428,7 +449,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -440,7 +462,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interface: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$interface<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -452,7 +475,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interfaceNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -464,7 +488,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interfaceWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -476,7 +501,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listInt<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -488,7 +514,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -500,7 +527,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listListInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListInt<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -512,7 +540,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listListIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -524,7 +553,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { lowerCaseUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -536,7 +566,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { object: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$object<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -548,7 +579,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -560,7 +592,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectListNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -572,7 +605,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectNested: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -584,7 +618,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -596,7 +631,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -608,7 +644,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { result: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.result<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -620,7 +657,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { resultNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.resultNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -632,7 +670,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { string: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$string<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -644,7 +683,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithArgEnum: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -659,7 +699,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithArgInputObject<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -674,7 +715,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithArgInputObjectRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery< @@ -691,7 +733,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithArgs: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -703,7 +746,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithListArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -718,7 +762,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithListArgRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -730,7 +775,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithRequiredArg: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -742,7 +788,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBar: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBar<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -754,7 +801,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBarNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -766,7 +814,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBarWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -778,7 +827,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionObject: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObject<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -790,7 +840,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionObjectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -804,7 +855,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationMutation<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -824,7 +876,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -836,7 +889,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -7653,7 +7707,8 @@ export interface QueryRootMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.QueryRoot<$Context["scalars"]> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery< @@ -7679,7 +7734,8 @@ export interface QueryRootMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.QueryRoot.id<$Context["scalars"]> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery< diff --git a/src/generator/generators/MethodsRoot.ts b/src/generator/generators/MethodsRoot.ts index 4fdb34770..064a37e26 100644 --- a/src/generator/generators/MethodsRoot.ts +++ b/src/generator/generators/MethodsRoot.ts @@ -54,7 +54,8 @@ const renderRootType = createCodeGenerator<{ node: Grafaid.Schema.ObjectType }>( export interface ${node.name}Methods<$Context extends ${identifiers.$$Utilities}.ClientContext> { $batch: <$SelectionSet>(selectionSet: ${identifiers.$$Utilities}.Exact<$SelectionSet, ${identifiers.$$SelectionSets}.${node.name}<$Context['scalars']>>) => Promise< - ${identifiers.$$Utilities}.Simplify< + ${identifiers.$$Utilities}.SimplifyExcept< + $Context['scalars']['typesDecoded'], ${identifiers.$$Utilities}.HandleOutput< $Context, InferResult.Operation${capitalizeFirstLetter(operationType)}<$SelectionSet, ${identifiers.$$Schema}.${identifiers.Schema}<$Context['scalars']>> @@ -90,7 +91,8 @@ 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}.Simplify< + ${identifiers.$$Utilities}.SimplifyExcept< + $Context['scalars']['typesDecoded'], ${identifiers.$$Utilities}.HandleOutputGraffleRootField< $Context, InferResult.Operation${capitalizeFirstLetter(operationType)}<{ ${field.name}: $SelectionSet}, ${identifiers.$$Schema}.${identifiers.Schema}<$Context['scalars']>>, diff --git a/src/generator/generators/SelectionSets.test-d.ts b/src/generator/generators/SelectionSets.test-d.ts index 55ee50520..81bac6b17 100644 --- a/src/generator/generators/SelectionSets.test-d.ts +++ b/src/generator/generators/SelectionSets.test-d.ts @@ -1,11 +1,11 @@ import { assertType, test } from 'vitest' -import type { Date } from '../../../tests/_/fixtures/scalars.js' +import type { DateScalar } from '../../../tests/_/fixtures/scalars.js' import { db } from '../../../tests/_/schemas/db.js' import type * as SelectionSets from '../../../tests/_/schemas/kitchen-sink/graffle/modules/selection-sets.js' import type { Schema } from '../../types/Schema/__.js' type Q = SelectionSets.Query -type QWithDate = SelectionSets.Query> +type QWithDate = SelectionSets.Query> // dprint-ignore test(`Query`, () => { diff --git a/src/layers/6_client/requestMethods/client.rootMethods.test-d.ts b/src/layers/6_client/requestMethods/client.rootMethods.test-d.ts index a78ce164a..3798a5514 100644 --- a/src/layers/6_client/requestMethods/client.rootMethods.test-d.ts +++ b/src/layers/6_client/requestMethods/client.rootMethods.test-d.ts @@ -1,11 +1,11 @@ /* eslint-disable */ import { expectTypeOf, test } from 'vitest' -import { Date } from '../../../../tests/_/fixtures/scalars.js' +import { DateScalar } from '../../../../tests/_/fixtures/scalars.js' import type { db } from '../../../../tests/_/schemas/db.js' import { Graffle } from '../../../../tests/_/schemas/kitchen-sink/graffle/__.js' import * as Schema from '../../../../tests/_/schemas/kitchen-sink/schema.js' -const graffle = Graffle.create({ schema: Schema.schema }).scalar(Date) +const graffle = Graffle.create({ schema: Schema.schema }).scalar(DateScalar) const x = await graffle.query.id({ $include: false }) // dprint-ignore diff --git a/src/layers/6_client/requestMethods/client.rootMethods.test.ts b/src/layers/6_client/requestMethods/client.rootMethods.test.ts index b645d8fcf..cb6efa993 100644 --- a/src/layers/6_client/requestMethods/client.rootMethods.test.ts +++ b/src/layers/6_client/requestMethods/client.rootMethods.test.ts @@ -1,38 +1,54 @@ -import { describe, expect } from 'vitest' -import { test } from '../../../../tests/_/helpers.js' +import { describe, expect, expectTypeOf } from 'vitest' +import { DateScalar } from '../../../../tests/_/fixtures/scalars.js' +import { kitchenSink, test } from '../../../../tests/_/helpers.js' -// dprint-ignore describe(`query`, () => { - test(`scalar`, async ({ kitchenSink, kitchenSinkData:db }) => { + test(`scalar`, async ({ kitchenSink, kitchenSinkData: db }) => { await expect(kitchenSink.query.id()).resolves.toEqual(db.id1) }) test(`argument`, async ({ kitchenSink }) => { await expect(kitchenSink.query.stringWithArgs({ $: { id: `x` } })).resolves.toEqual(`{"id":"x"}`) }) - // test(`argument custom scalar`, async ({ kitchenSink, kitchenSinkData:db }) => { - // await expect(kitchenSink.query.dateArg()).resolves.toEqual(db.date0) - // await expect(kitchenSink.query.dateArg({ $: { date: db.date1 }})).resolves.toEqual(db.date1) - // await expect(kitchenSink.query.dateArgNonNull({ $: { date: db.date1 }})).resolves.toEqual(db.date1) - // }) - test(`object`, async ({ kitchenSink, kitchenSinkData:db }) => { + + test(`object`, async ({ kitchenSink, kitchenSinkData: db }) => { await expect(kitchenSink.query.object({ id: true })).resolves.toEqual({ id: db.id }) }) test(`object with arguments`, async ({ kitchenSink }) => { await expect(kitchenSink.query.objectWithArgs({ $: { id: `x` }, id: true })).resolves.toEqual({ id: `x` }) }) - test(`union found`, async ({ kitchenSink, kitchenSinkData:db }) => { + test(`union found`, async ({ kitchenSink, kitchenSinkData: db }) => { await expect(kitchenSink.query.unionFooBar({ ___on_Foo: { id: true } })).resolves.toEqual({ id: db.id }) }) test(`union not found`, async ({ kitchenSink }) => { await expect(kitchenSink.query.unionFooBar({ ___on_Bar: { int: true } })).resolves.toEqual({}) }) - test(`interface fields`, async ({ kitchenSink, kitchenSinkData:db }) => { + test(`interface fields`, async ({ kitchenSink, kitchenSinkData: db }) => { await expect(kitchenSink.query.interface({ id: true })).resolves.toEqual({ id: db.id }) }) - test(`interface instance found`, async ({ kitchenSink, kitchenSinkData:db }) => { - await expect(kitchenSink.query.interface({ ___on_Object1ImplementingInterface: { int: true } })).resolves.toEqual({ int: db.int }) + test(`interface instance found`, async ({ kitchenSink, kitchenSinkData: db }) => { + const result = await kitchenSink.query.interface({ ___on_Object1ImplementingInterface: { int: true } }) + expect(result).toEqual({ int: db.int }) }) test(`interface instance not found`, async ({ kitchenSink }) => { - await expect(kitchenSink.query.interface({ ___on_Object2ImplementingInterface: { boolean: true } })).resolves.toEqual({}) + const result = await kitchenSink.query.interface({ ___on_Object2ImplementingInterface: { boolean: true } }) + expect(result).toEqual({}) + }) + describe(`custom scalar`, () => { + test(`result without codec`, async ({ kitchenSinkData: db }) => { + const result = await kitchenSink.query.dateArg() + expect(result).toEqual(db.date0Encoded) + expectTypeOf(result).toEqualTypeOf() + }) + test(`result with codec`, async ({ kitchenSinkData: db }) => { + const result = await kitchenSink.scalar(DateScalar).query.dateArg() + expect(result).toEqual(db.date0) + expectTypeOf(result).toEqualTypeOf() + }) + test(`argument without codec`, async ({ kitchenSinkData: db }) => { + await kitchenSink.query.dateArg({ $: { date: db.date0Encoded } }) + }) + test(`argument with codec`, async ({ kitchenSinkData: db }) => { + await kitchenSink.scalar(DateScalar).query.dateArg({ $: { date: db.date0 } }) + }) }) }) diff --git a/src/lib/prelude.ts b/src/lib/prelude.ts index 5adb7e808..58a08aa9d 100644 --- a/src/lib/prelude.ts +++ b/src/lib/prelude.ts @@ -1,5 +1,4 @@ -import type { IsEmptyObject, IsNever, IsUnknown, Simplify } from 'type-fest' -import type { ConditionalSimplify, ConditionalSimplifyDeep } from 'type-fest/source/conditional-simplify.js' +import type { IsAny, IsEmptyObject, IsNever, IsUnknown, Simplify } from 'type-fest' /* eslint-disable */ export type RemoveIndex = { @@ -387,15 +386,15 @@ export type PickRequiredProperties = { export type Negate = T extends true ? false : true -export type SimplifyExceptError = ConditionalSimplify +// export type SimplifyExceptError = ConditionalSimplify -export type SimplifyExceptErrorUnion = T extends any ? SimplifyExceptError : never +// export type SimplifyExceptErrorUnion = T extends any ? SimplifyExceptError : never -export type SimplifyUnion = T extends any ? Simplify : never +// export type SimplifyUnion = T extends any ? Simplify : never -export type SimplifyDeep = ConditionalSimplifyDeep | Date, object> +// export type SimplifyDeep = ConditionalSimplifyDeep | Date, object> -export type SimplifyDeepUnion = T extends any ? SimplifyDeep : never +// export type SimplifyDeepUnion = T extends any ? SimplifyDeep : never export type RequireProperties = Simplify @@ -629,3 +628,11 @@ export const isObjectEmpty = (object: Record) => { } export const toArray = (value: T | T[]) => Array.isArray(value) ? value : [value] + +// dprint-ignore +export type SimplifyExcept<$ExcludeType, $Type> = + IsAny<$ExcludeType> extends true + ? Simplify<$Type> + : $Type extends $ExcludeType + ? $Type + : {[TypeKey in keyof $Type]: $Type[TypeKey]} diff --git a/src/types/Schema/nodes/Scalar/helpers.ts b/src/types/Schema/nodes/Scalar/helpers.ts index b5a79fdac..0c704adbd 100644 --- a/src/types/Schema/nodes/Scalar/helpers.ts +++ b/src/types/Schema/nodes/Scalar/helpers.ts @@ -21,7 +21,7 @@ export interface Registry<$Map extends ScalarMap = ScalarMap, $TypesEncoded = an } export namespace Registry { - export type Empty = Registry<{}, never, never> + export type Empty = Registry<{}> export const empty = { map: {}, diff --git a/tests/_/fixtures/scalars.ts b/tests/_/fixtures/scalars.ts index a5545d956..7426e0933 100644 --- a/tests/_/fixtures/scalars.ts +++ b/tests/_/fixtures/scalars.ts @@ -1,6 +1,6 @@ import { Graffle } from '../../../src/entrypoints/main.js' -export const Date = Graffle.Scalars.create(`Date`, { +export const DateScalar = Graffle.Scalars.create(`Date`, { encode: (value: globalThis.Date) => value.toISOString(), decode: (value: string) => new globalThis.Date(value), }) diff --git a/tests/_/helpers.ts b/tests/_/helpers.ts index de1dd9653..70b88dca7 100644 --- a/tests/_/helpers.ts +++ b/tests/_/helpers.ts @@ -26,7 +26,9 @@ interface Project { }> } -export const kitchenSink = KitchenSink.create({ schema: kitchenSinkSchema }) +export const kitchenSink = KitchenSink.create({ + schema: kitchenSinkSchema, +}) export const createResponse = (body: object) => new Response(JSON.stringify(body), { status: 200, headers: { 'content-type': CONTENT_TYPE_REC } }) diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts b/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts index 2bcc5cef9..4eff6deab 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/methods-root.ts @@ -7,7 +7,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -27,7 +28,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { InputObjectNested: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ InputObjectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -39,7 +41,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { InputObjectNestedNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ InputObjectNestedNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -53,7 +56,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { abcEnum: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.abcEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ abcEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -65,7 +69,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { argInputObjectCircular: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ argInputObjectCircular: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -77,7 +82,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { date: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.date<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ date: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -89,7 +95,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -101,7 +108,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgInputObject: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -113,7 +121,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -125,7 +134,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -137,7 +147,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateArgNonNullList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNullList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -152,7 +163,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.dateArgNonNullListNonNull<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateArgNonNullListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -164,7 +176,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateInterface1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateInterface1<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateInterface1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -176,7 +189,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -188,7 +202,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateListList: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateListList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -200,7 +215,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateListNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -212,7 +228,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -224,7 +241,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateObject1: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateObject1<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateObject1: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -236,7 +254,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { dateUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.dateUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ dateUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -248,7 +267,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { error: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.error<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ error: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -260,7 +280,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -272,7 +293,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -284,7 +306,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interface: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$interface<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interface: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -296,7 +319,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interfaceNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interfaceNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -308,7 +332,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { interfaceWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ interfaceWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -320,7 +345,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listInt<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -332,7 +358,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -344,7 +371,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listListInt: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListInt<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listListInt: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -356,7 +384,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { listListIntNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ listListIntNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -368,7 +397,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { lowerCaseUnion: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ lowerCaseUnion: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -380,7 +410,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { object: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$object<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ object: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -392,7 +423,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectList: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectList<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectList: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -404,7 +436,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectListNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectListNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -416,7 +449,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectNested: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNested<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectNested: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -428,7 +462,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -440,7 +475,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { objectWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ objectWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -452,7 +488,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { result: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.result<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ result: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -464,7 +501,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { resultNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.resultNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ resultNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -476,7 +514,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { string: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.$string<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ string: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -488,7 +527,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithArgEnum: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgEnum: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -503,7 +543,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithArgInputObject<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgInputObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -518,7 +559,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithArgInputObjectRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery< @@ -535,7 +577,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithArgs: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -547,7 +590,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithListArg: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithListArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -562,7 +606,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $$SelectionSets.Query.stringWithListArgRequired<$Context['scalars']> >, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithListArgRequired: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -574,7 +619,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { stringWithRequiredArg: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ stringWithRequiredArg: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -586,7 +632,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBar: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBar<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBar: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -598,7 +645,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBarNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBarNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -610,7 +658,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionFooBarWithArgs: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionFooBarWithArgs: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -622,7 +671,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionObject: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObject<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionObject: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -634,7 +684,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { unionObjectNonNull: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ unionObjectNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -648,7 +699,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationMutation<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -668,7 +720,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -680,7 +733,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, diff --git a/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts b/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts index 405bac1dd..abc1ac450 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/methods-root.ts @@ -7,7 +7,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationMutation<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -27,7 +28,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -39,7 +41,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, diff --git a/tests/_/schemas/pokemon/graffle/modules/methods-root.ts b/tests/_/schemas/pokemon/graffle/modules/methods-root.ts index 96d4c88a6..748010c9a 100644 --- a/tests/_/schemas/pokemon/graffle/modules/methods-root.ts +++ b/tests/_/schemas/pokemon/graffle/modules/methods-root.ts @@ -7,7 +7,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -27,7 +28,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { battles: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.battles<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ battles: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -39,7 +41,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { beings: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.beings<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ beings: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -51,7 +54,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { pokemon: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemon<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ pokemon: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -63,7 +67,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { pokemonByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemonByName<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ pokemonByName: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -75,7 +80,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { pokemons: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemons<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ pokemons: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -87,7 +93,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { trainerByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainerByName<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ trainerByName: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -99,7 +106,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { trainers: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainers<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ trainers: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -113,7 +121,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationMutation<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -133,7 +142,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { addPokemon: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.addPokemon<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ addPokemon: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, diff --git a/tests/_/schemas/query-only/graffle/modules/methods-root.ts b/tests/_/schemas/query-only/graffle/modules/methods-root.ts index a38f9ddfa..5ec8ca725 100644 --- a/tests/_/schemas/query-only/graffle/modules/methods-root.ts +++ b/tests/_/schemas/query-only/graffle/modules/methods-root.ts @@ -7,7 +7,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery<$SelectionSet, $$Schema.Schema<$Context['scalars']>> @@ -27,7 +28,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { id: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.id<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ id: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, @@ -39,7 +41,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { idNonNull: <$SelectionSet>( selectionSet?: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.idNonNull<$Context['scalars']>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context['scalars']['typesDecoded'], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ idNonNull: $SelectionSet }, $$Schema.Schema<$Context['scalars']>>, diff --git a/website/graffle/modules/methods-root.ts b/website/graffle/modules/methods-root.ts index dc2e5d042..8ec8c17cd 100644 --- a/website/graffle/modules/methods-root.ts +++ b/website/graffle/modules/methods-root.ts @@ -7,7 +7,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery<$SelectionSet, $$Schema.Schema<$Context["scalars"]>> @@ -27,7 +28,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { continent: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.continent<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ continent: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -39,7 +41,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { continents: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.continents<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ continents: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -51,7 +54,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { countries: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.countries<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ countries: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -63,7 +67,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { country: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.country<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ country: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -75,7 +80,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { language: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.language<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ language: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -87,7 +93,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { languages: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.languages<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ languages: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, diff --git a/website/pokemon/modules/methods-root.ts b/website/pokemon/modules/methods-root.ts index a8fb7ad80..c1121c480 100644 --- a/website/pokemon/modules/methods-root.ts +++ b/website/pokemon/modules/methods-root.ts @@ -7,7 +7,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutput< $Context, InferResult.OperationQuery<$SelectionSet, $$Schema.Schema<$Context["scalars"]>> @@ -27,7 +28,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { battles: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.battles<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ battles: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -39,7 +41,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { beings: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.beings<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ beings: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -51,7 +54,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { pokemon: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemon<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ pokemon: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -63,7 +67,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { pokemonByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemonByName<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ pokemonByName: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -75,7 +80,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { pokemons: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.pokemons<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ pokemons: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -87,7 +93,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { trainerByName: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainerByName<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ trainerByName: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -99,7 +106,8 @@ export interface QueryMethods<$Context extends $$Utilities.ClientContext> { trainers: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Query.trainers<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationQuery<{ trainers: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>, @@ -113,7 +121,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { $batch: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutput< $Context, InferResult.OperationMutation<$SelectionSet, $$Schema.Schema<$Context["scalars"]>> @@ -133,7 +142,8 @@ export interface MutationMethods<$Context extends $$Utilities.ClientContext> { addPokemon: <$SelectionSet>( selectionSet: $$Utilities.Exact<$SelectionSet, $$SelectionSets.Mutation.addPokemon<$Context["scalars"]>>, ) => Promise< - $$Utilities.Simplify< + $$Utilities.SimplifyExcept< + $Context["scalars"]["typesDecoded"], $$Utilities.HandleOutputGraffleRootField< $Context, InferResult.OperationMutation<{ addPokemon: $SelectionSet }, $$Schema.Schema<$Context["scalars"]>>,