From 371803e72c440f0771357319748a3174e6360ead Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Mon, 21 Oct 2024 00:09:29 -0400 Subject: [PATCH] feat: scalar method (#1206) --- package.json | 2 +- src/entrypoints/client.ts | 2 +- src/entrypoints/utilities-for-generated.ts | 2 + src/extensions/CustomScalars/CustomScalars.ts | 4 +- src/extensions/CustomScalars/decode.test.ts | 47 +- src/extensions/CustomScalars/decode.ts | 17 +- src/extensions/CustomScalars/encode.test.ts | 25 +- src/extensions/CustomScalars/encode.ts | 60 +- .../schemaDrivenDataMap/generator.ts | 15 +- .../schemaDrivenDataMap/types.ts | 24 +- src/extensions/Introspection/Introspection.ts | 2 +- .../SchemaErrors/tests/SchemaError.test-d.ts | 1 - .../tests/fixture/graffle/modules/Global.ts | 3 - .../graffle/modules/MethodsDocument.ts | 10 +- .../fixture/graffle/modules/MethodsRoot.ts | 519 +-- .../tests/fixture/graffle/modules/Scalar.ts | 8 +- .../tests/fixture/graffle/modules/Schema.ts | 9 +- .../graffle/modules/SchemaDrivenDataMap.ts | 3 +- .../fixture/graffle/modules/SelectionSets.ts | 2557 +++++++++---- src/extensions/Upload/Upload.test.ts | 17 +- src/generator/config/config.ts | 22 +- .../__snapshots__/generate.test.ts.snap | 3166 ++++++++++++----- src/generator/generators/MethodsDocument.ts | 10 +- src/generator/generators/MethodsRoot.ts | 43 +- src/generator/generators/Scalar.ts | 31 +- src/generator/generators/Schema.ts | 17 +- .../generators/SelectionSets.test-d.ts | 16 +- src/generator/generators/SelectionSets.ts | 437 +-- src/generator/generators/global.ts | 4 - src/generator/helpers/identifiers.ts | 5 +- src/generator/helpers/render.ts | 7 +- src/layers/1_Schema/Directives.ts | 2 +- src/layers/1_Schema/Hybrid/typeGroups.ts | 2 +- .../1_Schema/Hybrid/types/Scalar/Scalar.ts | 50 +- .../1_Schema/Hybrid/types/Scalar/codec.ts | 9 +- src/layers/1_Schema/Input/typeGroups.ts | 2 +- src/layers/1_Schema/Output/typeGroups.ts | 8 +- src/layers/1_Schema/Output/types/Field.ts | 3 +- src/layers/3_InferResult/Field.ts | 14 +- src/layers/3_InferResult/ScalarsWildcard.ts | 8 +- src/layers/3_InferResult/__.test-d.ts | 12 +- .../__snapshots__/toGraphQL.test.ts.snap | 782 +++- src/layers/3_SelectGraphQLMapper/context.ts | 3 + .../inferVariableType.ts | 8 +- .../3_SelectGraphQLMapper/nodes/1_Document.ts | 3 +- .../3_SelectGraphQLMapper/nodes/5_Field.ts | 2 +- .../3_SelectGraphQLMapper/nodes/Value.ts | 8 +- .../3_SelectGraphQLMapper/toGraphQL.test.ts | 63 +- src/layers/5_request/core.ts | 2 + src/layers/5_request/hooks.ts | 4 +- src/layers/6_client/Settings/Config.ts | 2 +- src/layers/6_client/Settings/Input.ts | 16 +- src/layers/6_client/client.test.ts | 4 +- src/layers/6_client/client.ts | 19 +- .../{prefilled.ts => clientPrefilled.ts} | 31 +- src/layers/6_client/extension/extension.ts | 16 +- src/layers/6_client/extension/use.ts | 32 +- src/layers/6_client/fluent.ts | 28 +- src/layers/6_client/gql/gql.ts | 8 +- src/layers/6_client/gql/send.ts | 6 +- src/layers/6_client/handleOutput.ts | 66 +- src/layers/6_client/properties/scalar.ts | 38 + .../client.rootMethods.test-d.ts | 9 +- .../requestMethods/client.rootMethods.test.ts | 12 +- .../6_client/requestMethods/document.ts | 6 +- .../6_client/requestMethods/requestMethods.ts | 20 +- src/layers/GlobalRegistry.ts | 22 +- src/lib/Code.ts | 9 +- .../config-manager/ConfigManager.test-d.ts | 29 +- src/lib/config-manager/ConfigManager.ts | 14 + src/lib/grafaid/request.ts | 4 +- src/lib/grafaid/schema/args.ts | 1 + src/lib/grafaid/schema/schema.ts | 10 + .../scalars.ts} | 2 +- tests/_/helpers.ts | 10 +- tests/_/schemas/db.ts | 15 +- tests/_/schemas/generate.ts | 2 +- .../kitchen-sink/graffle/modules/Global.ts | 3 - .../graffle/modules/MethodsDocument.ts | 10 +- .../graffle/modules/MethodsRoot.ts | 519 +-- .../kitchen-sink/graffle/modules/Scalar.ts | 15 +- .../kitchen-sink/graffle/modules/Schema.ts | 23 +- .../graffle/modules/SchemaDrivenDataMap.ts | 3 +- .../graffle/modules/SelectionSets.ts | 2557 +++++++++---- .../kitchen-sink/graffle/schema.graphql | 1 + tests/_/schemas/kitchen-sink/schema.ts | 1 + .../mutation-only/graffle/modules/Global.ts | 1 - .../graffle/modules/MethodsDocument.ts | 10 +- .../graffle/modules/MethodsRoot.ts | 48 +- .../mutation-only/graffle/modules/Scalar.ts | 2 +- .../mutation-only/graffle/modules/Schema.ts | 10 +- .../graffle/modules/SelectionSets.ts | 60 +- .../schemas/pokemon/graffle/modules/Global.ts | 1 - .../graffle/modules/MethodsDocument.ts | 10 +- .../pokemon/graffle/modules/MethodsRoot.ts | 128 +- .../schemas/pokemon/graffle/modules/Scalar.ts | 2 +- .../schemas/pokemon/graffle/modules/Schema.ts | 10 +- .../pokemon/graffle/modules/SelectionSets.ts | 1235 +++++-- .../query-only/graffle/modules/Global.ts | 1 - .../graffle/modules/MethodsDocument.ts | 10 +- .../query-only/graffle/modules/MethodsRoot.ts | 48 +- .../query-only/graffle/modules/Scalar.ts | 2 +- .../query-only/graffle/modules/Schema.ts | 10 +- .../graffle/modules/SelectionSets.ts | 60 +- website/graffle/modules/Global.ts | 1 - website/graffle/modules/MethodsDocument.ts | 10 +- website/graffle/modules/MethodsRoot.ts | 88 +- website/graffle/modules/Scalar.ts | 2 +- website/graffle/modules/Schema.ts | 10 +- website/graffle/modules/SelectionSets.ts | 911 ++++- website/pokemon/modules/Global.ts | 1 - website/pokemon/modules/MethodsDocument.ts | 10 +- website/pokemon/modules/MethodsRoot.ts | 128 +- website/pokemon/modules/Scalar.ts | 2 +- website/pokemon/modules/Schema.ts | 10 +- website/pokemon/modules/SelectionSets.ts | 1235 +++++-- 116 files changed, 11350 insertions(+), 4339 deletions(-) rename src/layers/6_client/{prefilled.ts => clientPrefilled.ts} (60%) create mode 100644 src/layers/6_client/properties/scalar.ts rename tests/_/{schemas/kitchen-sink/customScalarCodecs.ts => fixtures/scalars.ts} (73%) diff --git a/package.json b/package.json index 831bd41db..7d863f95a 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "serve:pokemon": "tsx tests/_/services/pokemonManual.ts", "gen:graffle": "pnpm gen:graffle:tests && pnpm build && cd website && pnpm gen:graffle", "gen:graffle:tests": "tsx tests/_/schemas/generate.ts && pnpm graffle --project src/extensions/SchemaErrors/tests/fixture", - "graffle": "tsx ./src/cli/generate.ts", + "graffle": "tsx ./src/generator/cli/generate.ts", "gen:examples": "tsx scripts/generate-examples-derivatives/generate.ts && pnpm format", "dev": "rm -rf dist && tsc --watch", "format": "pnpm build:docs && dprint fmt", diff --git a/src/entrypoints/client.ts b/src/entrypoints/client.ts index 091acf20a..ebd3711ef 100644 --- a/src/entrypoints/client.ts +++ b/src/entrypoints/client.ts @@ -1,4 +1,4 @@ export { create as createSelect, select } from '../layers/5_select/select.js' export { type Client, create } from '../layers/6_client/client.js' -export { createPrefilled, type InputPrefilled } from '../layers/6_client/prefilled.js' +export { createPrefilled } from '../layers/6_client/clientPrefilled.js' export { type InputStatic } from '../layers/6_client/Settings/Input.js' diff --git a/src/entrypoints/utilities-for-generated.ts b/src/entrypoints/utilities-for-generated.ts index 7741fc889..a88f303ee 100644 --- a/src/entrypoints/utilities-for-generated.ts +++ b/src/entrypoints/utilities-for-generated.ts @@ -1,7 +1,9 @@ export { type Simplify } from 'type-fest' export { type SchemaDrivenDataMap } from '../extensions/CustomScalars/schemaDrivenDataMap/__.js' export { type Schema as SchemaIndexBase } from '../generator/generators/Schema.js' +export { SchemaKit } from '../layers/1_Schema/__.js' export * from '../layers/2_Select/__.js' +export { type ClientContext } from '../layers/6_client/fluent.js' export type { ConfigGetOutputError, HandleOutput, diff --git a/src/extensions/CustomScalars/CustomScalars.ts b/src/extensions/CustomScalars/CustomScalars.ts index 7f7f43e81..a902569ac 100644 --- a/src/extensions/CustomScalars/CustomScalars.ts +++ b/src/extensions/CustomScalars/CustomScalars.ts @@ -10,6 +10,7 @@ export const CustomScalars = () => // documentNode: true, onRequest: (async ({ pack }) => { const sddm = pack.input.state.config.schemaMap + const scalars = pack.input.state.scalars if (!sddm) return pack() const request = normalizeRequestToNode(pack.input.request) @@ -17,7 +18,7 @@ export const CustomScalars = () => // We will mutate query. Assign it back to input for it to be carried forward. pack.input.request.query = request.query - encodeRequestVariables({ sddm, request }) + encodeRequestVariables({ sddm, scalars, request }) const { exchange } = await pack() const { unpack } = await exchange() @@ -33,6 +34,7 @@ export const CustomScalars = () => sddm, request, data: decode.input.result.data, + scalars, }) } diff --git a/src/extensions/CustomScalars/decode.test.ts b/src/extensions/CustomScalars/decode.test.ts index 0f8f0e17d..f723eeb37 100644 --- a/src/extensions/CustomScalars/decode.test.ts +++ b/src/extensions/CustomScalars/decode.test.ts @@ -1,4 +1,5 @@ import { describe, expect } from 'vitest' +import { Date } 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' @@ -6,11 +7,9 @@ import { Select } from '../../layers/2_Select/__.js' import { SelectionSetGraphqlMapper } from '../../layers/3_SelectGraphQLMapper/__.js' import { Grafaid } from '../../lib/grafaid/__.js' -const date0Encoded = db.date0.toISOString() - type TestCase = [ describe: string, - query: Graffle.SelectionSets.Query, + query: Graffle.SelectionSets.Query<{ Date: typeof Date }>, responseData: object, expectedData: object, ] @@ -22,7 +21,7 @@ const withBatch: TestCaseWith = [ {}, async ([_, query, responseData, expectedData], { fetch, kitchenSinkHttp: kitchenSink }) => { fetch.mockResolvedValueOnce(createResponse({ data: responseData })) - expect(await kitchenSink.query.$batch(query)).toEqual(expectedData) + expect(await kitchenSink.scalar(Date).query.$batch(query)).toEqual(expectedData) }, ] @@ -34,7 +33,7 @@ const withGqlDocument: TestCaseWith = [ const { document } = SelectionSetGraphqlMapper.toGraphQL( Select.Document.createDocumentNormalizedFromQuerySelection(query as any), ) - expect(await kitchenSink.gql(document).send()).toEqual(expectedData) + expect(await kitchenSink.scalar(Date).gql(document).send()).toEqual(expectedData) }, ] @@ -46,47 +45,47 @@ const withGqlString: TestCaseWith = [ const { document } = SelectionSetGraphqlMapper.toGraphQL( Select.Document.normalizeOrThrow({ query: { foo: query as any } }), ) - expect(await kitchenSink.gql(Grafaid.Document.print(document)).send()).toEqual(expectedData) + expect(await kitchenSink.scalar(Date).gql(Grafaid.Document.print(document)).send()).toEqual(expectedData) }, ] // dprint-ignore const testGeneralCases = test.for([ - [`nullable null`, { date: true }, { date: null }, { date: null }], - [`nullable value`, { date: true }, { date: date0Encoded }, { date: db.date0 }], - [`non-null`, { dateNonNull: true }, { dateNonNull: date0Encoded }, { dateNonNull: db.date0 }], - [`list`, { dateList: true }, { dateList: [0, 1] }, { dateList: [db.date0, new Date(1)] }], - [`list list`, { dateListList: true }, { dateListList: [[0, 1],[0,1]] }, { dateListList: [[db.date0, new Date(1)],[db.date0, new Date(1)]] }], - [`list non-null`, { dateListNonNull: true }, { dateListNonNull: [0, 1] }, { dateListNonNull: [db.date0, new Date(1)] }], - [`object field`, { dateObject1: { date1: true } }, { dateObject1: { date1: date0Encoded } }, { dateObject1: { date1: db.date0 } }], - [`interface field`, { dateInterface1: { date1: true } }, { dateInterface1: { date1: date0Encoded } }, { dateInterface1: { date1: db.date0 } }], - [`interface inline fragment`, { dateInterface1: { ___on_DateObject1: { date1: true } } }, { dateInterface1: { date1: date0Encoded } }, { dateInterface1: { date1: db.date0 } }], + [`nullable null`, { date: true }, { date: null }, { date: null }], + [`nullable value`, { date: true }, { date: db.date0Encoded }, { date: db.date0 }], + [`non-null`, { dateNonNull: true }, { dateNonNull: db.date0Encoded }, { dateNonNull: db.date0 }], + [`list`, { dateList: true }, { dateList: [0, 1] }, { dateList: [db.date0, db.date1] }], + [`list list`, { dateListList: true }, { dateListList: [[0, 1],[0,1]] }, { dateListList: [[db.date0, db.date1],[db.date0, db.date1]] }], + [`list non-null`, { dateListNonNull: true }, { dateListNonNull: [0, 1] }, { dateListNonNull: [db.date0, db.date1] }], + [`object field`, { dateObject1: { date1: true } }, { dateObject1: { date1: db.date0Encoded } }, { dateObject1: { date1: db.date0 } }], + [`interface field`, { dateInterface1: { date1: true } }, { dateInterface1: { date1: db.date0Encoded } }, { dateInterface1: { date1: db.date0 } }], + [`interface inline fragment`, { dateInterface1: { ___on_DateObject1: { date1: true } } }, { dateInterface1: { date1: db.date0Encoded } }, { dateInterface1: { date1: db.date0 } }], ]) // dprint-ignore const testAliasCases = test.for([ - [`alias`, { date: [`x`, true] }, { x: date0Encoded }, { x: db.date0 }], - [`interface inline fragment alias`, { dateInterface1: { ___on_DateObject1: { date1: [`x`, true] } } }, { dateInterface1: { x: date0Encoded }}, { dateInterface1: { x: db.date0 }}], - [`interface inline fragment nested alias`, { dateInterface1: { ___on_DateObject1: { ___: { date1: [`x`, true] } } } }, { dateInterface1: { x: date0Encoded }}, { dateInterface1: { x: db.date0 }}], - [`inline fragment interface alias`, { ___: { dateInterface1: { ___on_DateObject1: { date1: [`x`, true] } } } }, { dateInterface1: { x: date0Encoded }}, { dateInterface1: { x: db.date0 }}], - [`inline fragment x2 interface alias & nullable value`, { ___: [{ dateInterface1: { ___on_DateObject1: { date1: [`x`, true] } } }, {date: [`y`,true]}] }, { dateInterface1: { x: date0Encoded }, y: date0Encoded }, { dateInterface1: { x: db.date0 }, y: db.date0 }], + [`alias`, { date: [`x`, true] }, { x: db.date0Encoded }, { x: db.date0 }], + [`interface inline fragment alias`, { dateInterface1: { ___on_DateObject1: { date1: [`x`, true] } } }, { dateInterface1: { x: db.date0Encoded }}, { dateInterface1: { x: db.date0 }}], + [`interface inline fragment nested alias`, { dateInterface1: { ___on_DateObject1: { ___: { date1: [`x`, true] } } } }, { dateInterface1: { x: db.date0Encoded }}, { dateInterface1: { x: db.date0 }}], + [`inline fragment interface alias`, { ___: { dateInterface1: { ___on_DateObject1: { date1: [`x`, true] } } } }, { dateInterface1: { x: db.date0Encoded }}, { dateInterface1: { x: db.date0 }}], + [`inline fragment x2 interface alias & nullable value`, { ___: [{ dateInterface1: { ___on_DateObject1: { date1: [`x`, true] } } }, {date: [`y`,true]}] }, { dateInterface1: { x: db.date0Encoded }, y: db.date0Encoded }, { dateInterface1: { x: db.date0 }, y: db.date0 }], ]) // dprint-ignore const testUnionCases = test.for([ [`case 1with __typename`, { dateUnion: { __typename: true, ___on_DateObject1: { date1: true } } }, - { dateUnion: { __typename: `DateObject1`, date1: date0Encoded } }, + { dateUnion: { __typename: `DateObject1`, date1: db.date0Encoded } }, { dateUnion: { __typename: `DateObject1`, date1: db.date0 }} ], [`case 1 without __typename`, { dateUnion: { ___on_DateObject1: { date1: true } } }, - { dateUnion: { date1: date0Encoded } }, + { dateUnion: { date1: db.date0Encoded } }, { dateUnion: { date1: db.date0 } } ], [`case 2`, { dateUnion: { ___on_DateObject1: { date1: true }, ___on_DateObject2: { date2: true } } }, - { dateUnion: { date2: date0Encoded } }, + { dateUnion: { date2: db.date0Encoded } }, { dateUnion: { date2: db.date0 } } ], [`case 2 miss`, @@ -103,7 +102,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.query.$batch(query)).toEqual(expectedData) + expect(await kitchenSink.scalar(Date).query.$batch(query)).toEqual(expectedData) }) }) }) diff --git a/src/extensions/CustomScalars/decode.ts b/src/extensions/CustomScalars/decode.ts index 7cf27355b..c6998dce9 100644 --- a/src/extensions/CustomScalars/decode.ts +++ b/src/extensions/CustomScalars/decode.ts @@ -1,12 +1,14 @@ import { Kind } from 'graphql' +import { SchemaKit } from '../../entrypoints/schema.js' import { applyCodec } from '../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' +import type { RegisteredScalars } from '../../layers/6_client/fluent.js' import type { Grafaid } from '../../lib/grafaid/__.js' import { SchemaDrivenDataMap } from './schemaDrivenDataMap/__.js' /** * If a document is given then aliases will be decoded as well. */ -export const decodeResultData = ({ request, data, sddm }: { +export const decodeResultData = ({ request, data, sddm, scalars }: { /** * Result data to decode. */ @@ -19,6 +21,10 @@ export const decodeResultData = ({ request, data, sddm }: { * Request is used to traverse aliases if any were used. */ request: Grafaid.RequestAnalyzedDocumentNodeInput + /** + * Registered custom scalars. + */ + scalars: RegisteredScalars }) => { const sddmOutputObject = sddm.roots[request.rootType] if (!sddmOutputObject) return @@ -27,6 +33,7 @@ export const decodeResultData = ({ request, data, sddm }: { data, sddmOutputObject, documentPart: request.operation.selectionSet, + scalars, }) } @@ -34,8 +41,9 @@ const decodeResultData_ = (input: { data: Grafaid.SomeObjectData | null | undefined sddmOutputObject: SchemaDrivenDataMap.OutputObject documentPart: null | Grafaid.Document.SelectionSetNode + scalars: RegisteredScalars }): void => { - const { data, sddmOutputObject, documentPart } = input + const { data, sddmOutputObject, documentPart, scalars } = input if (!data) return for (const [k, v] of Object.entries(data)) { @@ -51,14 +59,17 @@ const decodeResultData_ = (input: { const sddmNode = sddmOutputField.nt - // console.log(sddmNode) if (SchemaDrivenDataMap.isScalar(sddmNode)) { data[k] = applyCodec(sddmNode.codec.decode, v) + } else if (SchemaDrivenDataMap.isCustomScalarName(sddmNode)) { + const scalar = SchemaKit.Scalar.lookupCustomScalarOrFallbackToString(scalars, sddmNode) + data[k] = applyCodec(scalar.codec.decode, v) } else if (SchemaDrivenDataMap.isOutputObject(sddmNode)) { decodeResultData_({ data: v, sddmOutputObject: sddmNode, documentPart: documentField?.selectionSet ?? null, + scalars, }) } else { // enums not decoded. diff --git a/src/extensions/CustomScalars/encode.test.ts b/src/extensions/CustomScalars/encode.test.ts index 6393c92e9..1ec0974d3 100644 --- a/src/extensions/CustomScalars/encode.test.ts +++ b/src/extensions/CustomScalars/encode.test.ts @@ -1,4 +1,5 @@ import { expect } from 'vitest' +import { Date } 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' @@ -8,12 +9,9 @@ import { Select } from '../../layers/2_Select/__.js' import { SelectionSetGraphqlMapper } from '../../layers/3_SelectGraphQLMapper/__.js' import { Grafaid } from '../../lib/grafaid/__.js' -const date0Encoded = db.date0.toISOString() -const date1Encoded = db.date1.toISOString() - type TestCase = [ description: string, - query: Graffle.SelectionSets.Query, + query: Graffle.SelectionSets.Query<{ Date: typeof Date }>, expectedVariables: object, ] @@ -21,18 +19,19 @@ type TestCase = [ // dprint-ignore const testCases = test.for([ [`arg enum` , { stringWithArgEnum: { $: { $ABCEnum: `A` } } } , { ABCEnum: `A` }], - [`arg field` , { dateArg: { $: { date: db.date0 } } } , { date: date0Encoded }], - [`arg field in non-null` , { dateArgNonNull: { $: { date: db.date0 } } } , { date: date0Encoded }], - [`arg field in list` , { dateArgList: { $: { date: [db.date0, db.date1] } } } , { date: [date0Encoded, date1Encoded] }], + [`arg field` , { dateArg: { $: { date: db.date0 } } } , { date: db.date0Encoded }], + [`arg field in non-null` , { dateArgNonNull: { $: { date: db.date0 } } } , { date: db.date0Encoded }], + [`arg field in list` , { dateArgList: { $: { date: [db.date0, db.date1] } } } , { date: [db.date0Encoded, db.date1Encoded] }], [`arg field in list (null)` , { dateArgList: { $: { date: null } } } , { date: null } ], - [`arg field in non-null list (with list)` , { dateArgNonNullList: { $: { date: [db.date0, db.date1] } } } , { date: [date0Encoded, date1Encoded] }], - [`arg field in non-null list (with null)` , { dateArgNonNullList: { $: { date: [null, db.date0] } } } , { date: [null, date0Encoded] }], - [`arg field in non-null list non-null` , { dateArgNonNullListNonNull: { $: { date: [db.date0, db.date1] } } } , { date: [date0Encoded, date1Encoded] }], - [`input object field` , { dateArgInputObject: { $: { input: { idRequired: ``, dateRequired: db.date0, date: db.date1 } } } } , { input: { idRequired: ``, dateRequired: date0Encoded, date: date1Encoded } }], - [`nested input object field` , { InputObjectNested: { $: { input: { InputObject: { idRequired: ``, dateRequired: db.date0, date: db.date1 }}}}} , { input: { InputObject: { idRequired: ``, dateRequired: date0Encoded, date: date1Encoded } } }], + [`arg field in non-null list (with list)` , { dateArgNonNullList: { $: { date: [db.date0, db.date1] } } } , { date: [db.date0Encoded, db.date1Encoded] }], + [`arg field in non-null list (with null)` , { dateArgNonNullList: { $: { date: [null, db.date0] } } } , { date: [null, db.date0Encoded] }], + [`arg field in non-null list non-null` , { dateArgNonNullListNonNull: { $: { date: [db.date0, db.date1] } } } , { date: [db.date0Encoded, db.date1Encoded] }], + [`input object field` , { dateArgInputObject: { $: { input: { idRequired: ``, dateRequired: db.date0, date: db.date1 } } } } , { input: { idRequired: ``, dateRequired: db.date0Encoded, date: db.date1Encoded } }], + [`nested input object field` , { InputObjectNested: { $: { input: { InputObject: { idRequired: ``, dateRequired: db.date0, date: db.date1 }}}}} , { input: { InputObject: { idRequired: ``, dateRequired: db.date0Encoded, date: db.date1Encoded } } }], ]) testCases(`%s`, async ([_, query, expectedVariables], { kitchenSink }) => { + const g = kitchenSink.use(Spy()).scalar(Date) const { document, operationsVariables } = SelectionSetGraphqlMapper.toGraphQL( Select.Document.createDocumentNormalizedFromQuerySelection(query as any), { @@ -41,6 +40,6 @@ testCases(`%s`, async ([_, query, expectedVariables], { kitchenSink }) => { }, ) const documentString = Grafaid.Document.print(document) - await kitchenSink.use(Spy()).gql(documentString).send(operationsVariables[`$default`]) + await g.gql(documentString).send(operationsVariables[`$default`]) expect(Spy.data.pack.input?.request.variables).toEqual(expectedVariables) }) diff --git a/src/extensions/CustomScalars/encode.ts b/src/extensions/CustomScalars/encode.ts index c5cfdb0f6..c2e9cf2d4 100644 --- a/src/extensions/CustomScalars/encode.ts +++ b/src/extensions/CustomScalars/encode.ts @@ -1,42 +1,68 @@ +import { SchemaKit } from '../../entrypoints/schema.js' import { applyCodec } from '../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' +import type { RegisteredScalars } from '../../layers/6_client/fluent.js' import { Grafaid } from '../../lib/grafaid/__.js' import { SchemaDrivenDataMap } from './schemaDrivenDataMap/__.js' -export const encodeRequestVariables = ({ sddm, request }: { +export const encodeRequestVariables = ({ sddm, request, scalars }: { sddm: SchemaDrivenDataMap + scalars: RegisteredScalars request: Grafaid.RequestAnalyzedDocumentNodeInput }): void => { const variableDefinitions = request.operation.variableDefinitions if (!variableDefinitions) return - const variableDefinitionsMap = new Map(variableDefinitions.map(v => [v.variable.name.value, v])) + const parametersMap = new Map(variableDefinitions.map(v => [v.variable.name.value, v])) - const variables = request.variables ?? {} + const args = request.variables ?? {} // todo align the iteration strategy with other func. - for (const variableName in variables) { - const definition = variableDefinitionsMap.get(variableName) - if (!definition) continue // todo in a strict mode could be error. + for (const argName in args) { + const parameter = parametersMap.get(argName) + if (!parameter) continue // todo in a strict mode could be error. - const value = variables[variableName] - if (value === undefined) continue + const argValue = args[argName] + if (argValue === undefined) continue - const namedType = Grafaid.Document.getNamedType(definition.type) + const namedType = Grafaid.Document.getNamedType(parameter.type) const sddmNamedType = sddm.types[namedType.name.value] if (!sddmNamedType) continue // todo in a strict mode could be error. - encodeInputFieldLike(variables, variableName, value, sddmNamedType) + encodeInputFieldLike(args, argName, argValue, sddmNamedType, scalars) } } const encodeInputFieldLike = ( - object: Record, - name: any, - value: any, + args: Record, + argName: any, + argValue: any, sddmNode: SchemaDrivenDataMap.InputLike, + scalars: RegisteredScalars, ) => { + /** + * The SDDM for custom scalars can take two forms: + * + * 1. It can have references to runtime custom scalar codecs if the user has supplied such references at gentime. + * + * 2. If the user has not done said gentime configuration, then the SDDM will only carry the names of custom scalars. + * + * In case (2), the runtime scalars can have been supplied by the user in the runtime configuration (e.g. `graffle.scalar(...)`). + * If they have not, then the String scalar will be used. + * + * Case (1) has the disadvantage of more verbose configuration for the user (because it forces the gentime configuration), + * but the assumed benefit of better performing type generation because they types are simpler, making no use of + * type-functions. Also, it reduces the runtime configuration needed, which could be DRY if the user has multiple schemas + * repeating use of the same custom scalar. + */ + + if (SchemaDrivenDataMap.isCustomScalarName(sddmNode)) { + const scalar = SchemaKit.Scalar.lookupCustomScalarOrFallbackToString(scalars, sddmNode) + args[argName] = applyCodec(scalar.codec.encode, argValue) + return + } + if (SchemaDrivenDataMap.isScalar(sddmNode)) { - object[name] = applyCodec(sddmNode.codec.encode, value) + args[argName] = applyCodec(sddmNode.codec.encode, argValue) return } @@ -47,15 +73,15 @@ const encodeInputFieldLike = ( // The optimal choice is about which is smaller. // TODO let users supply an algorithm choice. for (const nameOfFieldIsOrContainingCustomScalar of sddmNode.fcs ?? []) { - if (!(typeof value === `object` && value !== null)) continue + if (!(typeof argValue === `object` && argValue !== null)) continue - const variableValue2 = value[nameOfFieldIsOrContainingCustomScalar] + const variableValue2 = argValue[nameOfFieldIsOrContainingCustomScalar] if (variableValue2 === undefined) continue const sddmNode2 = sddmNode.f?.[nameOfFieldIsOrContainingCustomScalar] if (!sddmNode2?.nt) continue - encodeInputFieldLike(value, nameOfFieldIsOrContainingCustomScalar, variableValue2, sddmNode2.nt) + encodeInputFieldLike(argValue, nameOfFieldIsOrContainingCustomScalar, variableValue2, sddmNode2.nt, scalars) } } } diff --git a/src/extensions/CustomScalars/schemaDrivenDataMap/generator.ts b/src/extensions/CustomScalars/schemaDrivenDataMap/generator.ts index 6a4bd7f27..4bd11ec79 100644 --- a/src/extensions/CustomScalars/schemaDrivenDataMap/generator.ts +++ b/src/extensions/CustomScalars/schemaDrivenDataMap/generator.ts @@ -147,6 +147,7 @@ const inputTypeCondition = (config: Config) => { // // // + const ScalarType = createCodeGenerator< { type: Grafaid.Schema.ScalarType } >( @@ -155,6 +156,18 @@ const ScalarType = createCodeGenerator< }, ) +const ScalarTypeCustom = createCodeGenerator< + { type: Grafaid.Schema.ScalarType } +>( + ({ config, code, type }) => { + if (config.options.isImportsCustomScalars) { + code(Code.termConst(type.name, `${identifiers.$Scalar}.${type.name}`)) + } else { + code(Code.termConst(type.name, Code.string(type.name))) + } + }, +) + const UnionType = createCodeGenerator< { type: Grafaid.Schema.UnionType; referenceAssignments: ReferenceAssignments } >( @@ -363,7 +376,7 @@ const InputObjectType = createCodeGenerator< const kindRenders = { GraphQLScalarTypeStandard: ScalarType, - GraphQLScalarTypeCustom: ScalarType, + GraphQLScalarTypeCustom: ScalarTypeCustom, GraphQLEnumType: EnumType, GraphQLUnionType: UnionType, GraphQLInterfaceType: InterfaceType, diff --git a/src/extensions/CustomScalars/schemaDrivenDataMap/types.ts b/src/extensions/CustomScalars/schemaDrivenDataMap/types.ts index 29a5b271e..790e9efdc 100644 --- a/src/extensions/CustomScalars/schemaDrivenDataMap/types.ts +++ b/src/extensions/CustomScalars/schemaDrivenDataMap/types.ts @@ -1,5 +1,6 @@ import { Scalar, type Scalar as SchemaScalar } from '../../../layers/1_Schema/_.js' import type { Grafaid } from '../../../lib/grafaid/__.js' +import { isString } from '../../../lib/prelude.js' declare global { namespace GraffleGlobal { @@ -99,6 +100,8 @@ export type ArgumentsOrInputObjectFields = GraffleGlobal.SchemaDrivenDataMap.Arg export type Scalar = SchemaScalar.Scalar +export type CustomScalarName = string + export type ArgumentOrInputField = GraffleGlobal.SchemaDrivenDataMap.ArgumentOrInputField export const propertyNames = { @@ -128,15 +131,19 @@ export type NonNull = 1 export const isEnum = ( node?: Node, ): node is Enum => { - return node ? `k` in node && node.k === `enum` : false + return node ? !isString(node) && `k` in node && node.k === `enum` : false } +export const isCustomScalarName = (value: unknown): value is CustomScalarName => isString(value) + export const isScalar = Scalar.isScalar +export const isScalarLike = (value: unknown): value is ScalarLike => Scalar.isScalar(value) || isCustomScalarName(value) + export const isOutputObject = ( node?: Node, ): node is OutputObject => { - return node ? propertyNames.f in node : false + return node ? !isString(node) && propertyNames.f in node : false } export const nullabilityFlags = { @@ -151,20 +158,22 @@ export const nullabilityFlags = { export const isInputObject = ( node?: InputLike, ): node is InputObject => { - return node ? propertyNames.f in node : false + return node ? !isString(node) && propertyNames.f in node : false } export const isOutputField = ( node?: Node, ): node is GraffleGlobal.SchemaDrivenDataMap.OutputField => { - return node ? `a` in node : false + return node ? !isString(node) && propertyNames.a in node : false } -export type NamedLike = SchemaScalar.Scalar | OutputObject | Enum | InputObject +export type NamedLike = ScalarLike | OutputObject | Enum | InputObject + +export type OutputLike = SchemaScalar.Scalar | OutputObject | Enum | CustomScalarName -export type OutputLike = SchemaScalar.Scalar | OutputObject | Enum +export type ScalarLike = SchemaScalar.Scalar | CustomScalarName -export type InputLike = SchemaScalar.Scalar | InputObject | Enum +export type InputLike = ScalarLike | InputObject | Enum export type Node = | OutputObject @@ -175,3 +184,4 @@ export type Node = | SchemaDrivenDataMap | Scalar | Enum + | CustomScalarName diff --git a/src/extensions/Introspection/Introspection.ts b/src/extensions/Introspection/Introspection.ts index 669c7f194..b28878754 100644 --- a/src/extensions/Introspection/Introspection.ts +++ b/src/extensions/Introspection/Introspection.ts @@ -60,5 +60,5 @@ interface IntrospectFn extends Fluent.FnProperty<`introspect`> { } interface Introspect<$Args extends FnParametersProperty> { - (): Promise>> + (): Promise>> } diff --git a/src/extensions/SchemaErrors/tests/SchemaError.test-d.ts b/src/extensions/SchemaErrors/tests/SchemaError.test-d.ts index 0836d3d5c..3c597e3b6 100644 --- a/src/extensions/SchemaErrors/tests/SchemaError.test-d.ts +++ b/src/extensions/SchemaErrors/tests/SchemaError.test-d.ts @@ -13,7 +13,6 @@ test(`config type is augmented with type hook`, () => { test(`config type is augmented with type hook after "with"`, () => { const g2 = g.with({ output: { defaults: { errorChannel: `throw` } } }) - g2._.config.typeHooks.onRequestResult expectTypeOf().toMatchTypeOf<[Extension.Hooks.OnRequestResult]>() }) diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Global.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Global.ts index 6d3eea690..2659a6fcf 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Global.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Global.ts @@ -16,9 +16,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: { - Date: Scalar.Date - } defaultSchemaUrl: null } } diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsDocument.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsDocument.ts index 1badef0b3..027637d44 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsDocument.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsDocument.ts @@ -2,9 +2,11 @@ import type * as Utilities from '../../../../../../entrypoints/utilities-for-gen import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -14,5 +16,5 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsRoot.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsRoot.ts index 1e6cdb200..45dddf352 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsRoot.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/MethodsRoot.ts @@ -1,87 +1,91 @@ import { type Simplify } from 'type-fest' import type { InferResult } from '../../../../../../entrypoints/schema.js' -import type * as Utils from '../../../../../../entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../entrypoints/utilities-for-generated.js' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface MutationMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation>) => Promise< +export interface MutationMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Mutation<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Mutation<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Mutation' }, '__typename' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > } -export interface QueryMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query>) => Promise< +export interface QueryMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Query<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Query<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Query' }, '__typename' > > > InputObjectNested: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.InputObjectNested>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ InputObjectNested: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ InputObjectNested: $SelectionSet }, Schema<$Context['scalars']>>, 'InputObjectNested' > > > InputObjectNestedNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.InputObjectNestedNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ InputObjectNestedNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ InputObjectNestedNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'InputObjectNestedNonNull' > > @@ -89,387 +93,434 @@ export interface QueryMethods<$Config extends Utils.Config> { /** * Query enum field documentation. */ - abcEnum: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.abcEnum>) => Promise< + abcEnum: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.abcEnum<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ abcEnum: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ abcEnum: $SelectionSet }, Schema<$Context['scalars']>>, 'abcEnum' > > > argInputObjectCircular: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.argInputObjectCircular>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ argInputObjectCircular: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ argInputObjectCircular: $SelectionSet }, Schema<$Context['scalars']>>, 'argInputObjectCircular' > > > - date: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.date>) => Promise< + date: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.date<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ date: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ date: $SelectionSet }, Schema<$Context['scalars']>>, 'date' > > > - dateArg: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArg>) => Promise< + dateArg: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArg<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArg: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArg' > > > dateArgInputObject: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgInputObject>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgInputObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgInputObject: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgInputObject' > > > - dateArgList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgList>) => Promise< + dateArgList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgList' > > > dateArgNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNull' > > > dateArgNonNullList: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullList>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNullList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNullList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNullList' > > > dateArgNonNullListNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullListNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNullListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNullListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNullListNonNull' > > > dateInterface1: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateInterface1>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateInterface1<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateInterface1: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateInterface1: $SelectionSet }, Schema<$Context['scalars']>>, 'dateInterface1' > > > - dateList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateList>) => Promise< + dateList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateList' > > > - dateListList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateListList>) => Promise< + dateListList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateListList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateListList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateListList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateListList' > > > dateListNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateListNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateListNonNull' > > > - dateNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateNonNull>) => Promise< + dateNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateNonNull' > > > - dateObject1: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateObject1>) => Promise< + dateObject1: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateObject1<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateObject1: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateObject1: $SelectionSet }, Schema<$Context['scalars']>>, 'dateObject1' > > > - dateUnion: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateUnion>) => Promise< + dateUnion: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateUnion<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateUnion: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateUnion: $SelectionSet }, Schema<$Context['scalars']>>, 'dateUnion' > > > - error: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.error>) => Promise< + error: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.error<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ error: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ error: $SelectionSet }, Schema<$Context['scalars']>>, 'error' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > - interface: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.$interface>) => Promise< + interface: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$interface<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interface: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interface: $SelectionSet }, Schema<$Context['scalars']>>, 'interface' > > > interfaceNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.interfaceNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interfaceNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interfaceNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'interfaceNonNull' > > > interfaceWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.interfaceWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interfaceWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interfaceWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'interfaceWithArgs' > > > - listInt: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listInt>) => Promise< + listInt: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listInt<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listInt: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listInt: $SelectionSet }, Schema<$Context['scalars']>>, 'listInt' > > > listIntNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listIntNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listIntNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listIntNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'listIntNonNull' > > > - listListInt: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listListInt>) => Promise< + listListInt: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listListInt<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listListInt: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listListInt: $SelectionSet }, Schema<$Context['scalars']>>, 'listListInt' > > > listListIntNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listListIntNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listListIntNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listListIntNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'listListIntNonNull' > > > lowerCaseUnion: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.lowerCaseUnion>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ lowerCaseUnion: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ lowerCaseUnion: $SelectionSet }, Schema<$Context['scalars']>>, 'lowerCaseUnion' > > > - object: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.$object>) => Promise< + object: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$object<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ object: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ object: $SelectionSet }, Schema<$Context['scalars']>>, 'object' > > > - objectList: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectList>) => Promise< + objectList: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectList: $SelectionSet }, Schema<$Context['scalars']>>, 'objectList' > > > objectListNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectListNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'objectListNonNull' > > > - objectNested: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectNested>) => Promise< + objectNested: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectNested<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectNested: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectNested: $SelectionSet }, Schema<$Context['scalars']>>, 'objectNested' > > > - objectNonNull: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectNonNull>) => Promise< + objectNonNull: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'objectNonNull' > > > objectWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'objectWithArgs' > > > - result: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.result>) => Promise< + result: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.result<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ result: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ result: $SelectionSet }, Schema<$Context['scalars']>>, 'result' > > > - resultNonNull: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.resultNonNull>) => Promise< + resultNonNull: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.resultNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ resultNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ resultNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'resultNonNull' > > > - string: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.$string>) => Promise< + string: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$string<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ string: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ string: $SelectionSet }, Schema<$Context['scalars']>>, 'string' > > > stringWithArgEnum: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgEnum>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgEnum: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgEnum: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgEnum' > > > stringWithArgInputObject: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObject>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObject<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgInputObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgInputObject: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgInputObject' > > > stringWithArgInputObjectRequired: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObjectRequired>, + selectionSet: $$Utilities.Exact< + $SelectionSet, + SelectionSet.Query.stringWithArgInputObjectRequired<$Context['scalars']> + >, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgInputObjectRequired: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgInputObjectRequired: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgInputObjectRequired' > > @@ -478,108 +529,112 @@ export interface QueryMethods<$Config extends Utils.Config> { * The given arguments are reflected back as a JSON string. */ stringWithArgs: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgs>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgs' > > > stringWithListArg: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithListArg>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithListArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithListArg: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithListArg' > > > stringWithListArgRequired: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithListArgRequired>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithListArgRequired<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithListArgRequired: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithListArgRequired: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithListArgRequired' > > > stringWithRequiredArg: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithRequiredArg>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithRequiredArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithRequiredArg: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithRequiredArg' > > > - unionFooBar: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBar>) => Promise< + unionFooBar: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBar<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBar: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBar: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBar' > > > unionFooBarNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBarNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBarNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBarNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBarNonNull' > > > unionFooBarWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBarWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBarWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBarWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBarWithArgs' > > > - unionObject: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionObject>) => Promise< + unionObject: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionObject<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionObject: $SelectionSet }, Schema<$Context['scalars']>>, 'unionObject' > > > unionObjectNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionObjectNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionObjectNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionObjectNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'unionObjectNonNull' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - mutation: MutationMethods<$Config> - query: QueryMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + mutation: MutationMethods<$Context> + query: QueryMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Scalar.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Scalar.ts index 2bb4e2c5d..bba613628 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Scalar.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Scalar.ts @@ -1,4 +1,4 @@ -import type { SchemaKit } from '../../../../../../entrypoints/schema.js' +import type * as $$Utilities from '../../../../../../entrypoints/utilities-for-generated.js' export * from '../../../../../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' @@ -14,8 +14,4 @@ export * from '../../../../../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' // // -import type { String as Date } from '../../../../../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' - -export { String as Date } from '../../../../../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' -export type DateDecoded = SchemaKit.Scalar.GetDecoded -export type DateEncoded = SchemaKit.Scalar.GetEncoded +export type Date = $$Utilities.SchemaKit.Scalar.ScalarCodecless<'Date'> diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts index 1df96bf2d..c29336fb7 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts @@ -369,6 +369,7 @@ export namespace Schema { }> export type Object1 = $.Object$2<'Object1', { + ABCEnum: $.Field<'ABCEnum', $.Output.Nullable, null> boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> @@ -446,11 +447,13 @@ export namespace Schema { // // -import type * as Utilities from '../../../../../../entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../entrypoints/utilities-for-generated.js' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Mutation', 'Query'] RootUnion: Schema.Mutation | Schema.Query @@ -511,7 +514,7 @@ export interface Schema extends Utilities.SchemaIndexBase { Error: Schema.Error Interface: Schema.Interface } - customScalars: Utilities.SchemaIndexBase['customScalars'] + scalars: $Scalars extensions: { SchemaErrors: { objectNames: 'ErrorOne' | 'ErrorTwo' diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SchemaDrivenDataMap.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SchemaDrivenDataMap.ts index df1e84c12..a08e59e1f 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SchemaDrivenDataMap.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SchemaDrivenDataMap.ts @@ -42,7 +42,7 @@ const String = $Scalar.String // // -const Date = $Scalar.Date +const Date = 'Date' // // @@ -196,6 +196,7 @@ const Foo: $Utilities.SchemaDrivenDataMap.OutputObject = { const Object1: $Utilities.SchemaDrivenDataMap.OutputObject = { f: { + ABCEnum: {}, boolean: {}, float: {}, id: {}, diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SelectionSets.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SelectionSets.ts index eeeb317c7..fefeb0da3 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SelectionSets.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/SelectionSets.ts @@ -1,5 +1,5 @@ import type { Select as $Select } from '../../../../../../entrypoints/schema.js' -import type * as $Utilities from '../../../../../../entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../entrypoints/utilities-for-generated.js' import type * as $Scalar from './Scalar.js' // @@ -19,9 +19,9 @@ import type * as $Scalar from './Scalar.js' // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - query?: Record - mutation?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + query?: Record> + mutation?: Record> } // @@ -54,15 +54,15 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Mutation { +export interface Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `id` field on the `Mutation` object. Its type is `ID` (a `Scalar`). */ - id?: Mutation.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Mutation.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `idNonNull` field on the `Mutation` object. Its type is `ID` (a `Scalar`). */ - idNonNull?: Mutation.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Mutation.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -72,7 +72,9 @@ export interface Mutation { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Mutation$FragmentInline | Mutation$FragmentInline[] + ___?: + | Mutation$FragmentInline<$Scalars> + | Mutation$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -84,28 +86,54 @@ export interface Mutation { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Mutation$FragmentInline extends Mutation, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Mutation$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Mutation<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Mutation { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type idNonNull = $Select.Indicator.NoArgsIndicator + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + > } // @@ -122,219 +150,261 @@ export namespace Mutation { // ----------------------------------------| Entrypoint Interface | -export interface Query { +export interface Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `InputObjectNested` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - InputObjectNested?: Query.InputObjectNested$Expanded | $Select.SelectAlias.SelectAlias + InputObjectNested?: + | Query.InputObjectNested$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `InputObjectNestedNonNull` field on the `Query` object. Its type is `ID` (a `Scalar`). */ InputObjectNestedNonNull?: - | Query.InputObjectNestedNonNull - | $Select.SelectAlias.SelectAlias + | Query.InputObjectNestedNonNull<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `abcEnum` field on the `Query` object. Its type is Enum. */ - abcEnum?: Query.abcEnum$Expanded | $Select.SelectAlias.SelectAlias + abcEnum?: Query.abcEnum$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `argInputObjectCircular` field on the `Query` object. Its type is `String` (a `Scalar`). */ argInputObjectCircular?: - | Query.argInputObjectCircular$Expanded - | $Select.SelectAlias.SelectAlias + | Query.argInputObjectCircular$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `date` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - date?: Query.date$Expanded | $Select.SelectAlias.SelectAlias + date?: Query.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArg` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArg?: Query.dateArg$Expanded | $Select.SelectAlias.SelectAlias + dateArg?: Query.dateArg$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgInputObject` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgInputObject?: Query.dateArgInputObject$Expanded | $Select.SelectAlias.SelectAlias + dateArgInputObject?: + | Query.dateArgInputObject$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgList?: Query.dateArgList$Expanded | $Select.SelectAlias.SelectAlias + dateArgList?: Query.dateArgList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgNonNull?: Query.dateArgNonNull | $Select.SelectAlias.SelectAlias + dateArgNonNull?: Query.dateArgNonNull<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgNonNullList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgNonNullList?: Query.dateArgNonNullList | $Select.SelectAlias.SelectAlias + dateArgNonNullList?: + | Query.dateArgNonNullList<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgNonNullListNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ dateArgNonNullListNonNull?: - | Query.dateArgNonNullListNonNull - | $Select.SelectAlias.SelectAlias + | Query.dateArgNonNullListNonNull<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateInterface1` field on the `Query` object. Its type is Interface. */ - dateInterface1?: Query.dateInterface1$Expanded | $Select.SelectAlias.SelectAlias + dateInterface1?: + | Query.dateInterface1$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateList?: Query.dateList$Expanded | $Select.SelectAlias.SelectAlias + dateList?: Query.dateList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateListList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateListList?: Query.dateListList$Expanded | $Select.SelectAlias.SelectAlias + dateListList?: Query.dateListList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateListNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateListNonNull?: Query.dateListNonNull$Expanded | $Select.SelectAlias.SelectAlias + dateListNonNull?: + | Query.dateListNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateNonNull?: Query.dateNonNull$Expanded | $Select.SelectAlias.SelectAlias + dateNonNull?: Query.dateNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateObject1` field on the `Query` object. Its type is Object. */ - dateObject1?: Query.dateObject1$Expanded | $Select.SelectAlias.SelectAlias + dateObject1?: Query.dateObject1$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateUnion` field on the `Query` object. Its type is Union. */ - dateUnion?: Query.dateUnion$Expanded | $Select.SelectAlias.SelectAlias + dateUnion?: Query.dateUnion$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `error` field on the `Query` object. Its type is `String` (a `Scalar`). */ - error?: Query.error$Expanded | $Select.SelectAlias.SelectAlias + error?: Query.error$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - id?: Query.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Query.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `idNonNull` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - idNonNull?: Query.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Query.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `interface` field on the `Query` object. Its type is Interface. */ - interface?: Query.$interface$Expanded | $Select.SelectAlias.SelectAlias + interface?: Query.$interface$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `interfaceNonNull` field on the `Query` object. Its type is Interface. */ - interfaceNonNull?: Query.interfaceNonNull$Expanded | $Select.SelectAlias.SelectAlias + interfaceNonNull?: + | Query.interfaceNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `interfaceWithArgs` field on the `Query` object. Its type is Interface. */ - interfaceWithArgs?: Query.interfaceWithArgs | $Select.SelectAlias.SelectAlias + interfaceWithArgs?: + | Query.interfaceWithArgs<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `listInt` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listInt?: Query.listInt$Expanded | $Select.SelectAlias.SelectAlias + listInt?: Query.listInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `listIntNonNull` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listIntNonNull?: Query.listIntNonNull$Expanded | $Select.SelectAlias.SelectAlias + listIntNonNull?: + | Query.listIntNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `listListInt` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listListInt?: Query.listListInt$Expanded | $Select.SelectAlias.SelectAlias + listListInt?: Query.listListInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `listListIntNonNull` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listListIntNonNull?: Query.listListIntNonNull$Expanded | $Select.SelectAlias.SelectAlias + listListIntNonNull?: + | Query.listListIntNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `lowerCaseUnion` field on the `Query` object. Its type is Union. */ - lowerCaseUnion?: Query.lowerCaseUnion$Expanded | $Select.SelectAlias.SelectAlias + lowerCaseUnion?: + | Query.lowerCaseUnion$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `object` field on the `Query` object. Its type is Object. */ - object?: Query.$object$Expanded | $Select.SelectAlias.SelectAlias + object?: Query.$object$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `objectList` field on the `Query` object. Its type is Object. */ - objectList?: Query.objectList$Expanded | $Select.SelectAlias.SelectAlias + objectList?: Query.objectList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `objectListNonNull` field on the `Query` object. Its type is Object. */ - objectListNonNull?: Query.objectListNonNull$Expanded | $Select.SelectAlias.SelectAlias + objectListNonNull?: + | Query.objectListNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `objectNested` field on the `Query` object. Its type is Object. */ - objectNested?: Query.objectNested$Expanded | $Select.SelectAlias.SelectAlias + objectNested?: Query.objectNested$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `objectNonNull` field on the `Query` object. Its type is Object. */ - objectNonNull?: Query.objectNonNull$Expanded | $Select.SelectAlias.SelectAlias + objectNonNull?: + | Query.objectNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `objectWithArgs` field on the `Query` object. Its type is Object. */ - objectWithArgs?: Query.objectWithArgs$Expanded | $Select.SelectAlias.SelectAlias + objectWithArgs?: + | Query.objectWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `result` field on the `Query` object. Its type is Union. */ - result?: Query.result | $Select.SelectAlias.SelectAlias + result?: Query.result<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `resultNonNull` field on the `Query` object. Its type is Union. */ - resultNonNull?: Query.resultNonNull$Expanded | $Select.SelectAlias.SelectAlias + resultNonNull?: + | Query.resultNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `string` field on the `Query` object. Its type is `String` (a `Scalar`). */ - string?: Query.$string$Expanded | $Select.SelectAlias.SelectAlias + string?: Query.$string$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgEnum` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithArgEnum?: Query.stringWithArgEnum$Expanded | $Select.SelectAlias.SelectAlias + stringWithArgEnum?: + | Query.stringWithArgEnum$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgInputObject` field on the `Query` object. Its type is `String` (a `Scalar`). */ stringWithArgInputObject?: - | Query.stringWithArgInputObject$Expanded - | $Select.SelectAlias.SelectAlias + | Query.stringWithArgInputObject$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgInputObjectRequired` field on the `Query` object. Its type is `String` (a `Scalar`). */ stringWithArgInputObjectRequired?: - | Query.stringWithArgInputObjectRequired - | $Select.SelectAlias.SelectAlias + | Query.stringWithArgInputObjectRequired<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgs` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithArgs?: Query.stringWithArgs$Expanded | $Select.SelectAlias.SelectAlias + stringWithArgs?: + | Query.stringWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithListArg` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithListArg?: Query.stringWithListArg$Expanded | $Select.SelectAlias.SelectAlias + stringWithListArg?: + | Query.stringWithListArg$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithListArgRequired` field on the `Query` object. Its type is `String` (a `Scalar`). */ stringWithListArgRequired?: - | Query.stringWithListArgRequired - | $Select.SelectAlias.SelectAlias + | Query.stringWithListArgRequired<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithRequiredArg` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithRequiredArg?: Query.stringWithRequiredArg | $Select.SelectAlias.SelectAlias + stringWithRequiredArg?: + | Query.stringWithRequiredArg<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `unionFooBar` field on the `Query` object. Its type is Union. */ - unionFooBar?: Query.unionFooBar$Expanded | $Select.SelectAlias.SelectAlias + unionFooBar?: Query.unionFooBar$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `unionFooBarNonNull` field on the `Query` object. Its type is Union. */ - unionFooBarNonNull?: Query.unionFooBarNonNull$Expanded | $Select.SelectAlias.SelectAlias + unionFooBarNonNull?: + | Query.unionFooBarNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `unionFooBarWithArgs` field on the `Query` object. Its type is Union. */ - unionFooBarWithArgs?: Query.unionFooBarWithArgs$Expanded | $Select.SelectAlias.SelectAlias + unionFooBarWithArgs?: + | Query.unionFooBarWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `unionObject` field on the `Query` object. Its type is Object. */ - unionObject?: Query.unionObject$Expanded | $Select.SelectAlias.SelectAlias + unionObject?: Query.unionObject$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `unionObjectNonNull` field on the `Query` object. Its type is Object. */ - unionObjectNonNull?: Query.unionObjectNonNull$Expanded | $Select.SelectAlias.SelectAlias + unionObjectNonNull?: + | Query.unionObjectNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -344,7 +414,9 @@ export interface Query { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Query$FragmentInline | Query$FragmentInline[] + ___?: + | Query$FragmentInline<$Scalars> + | Query$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -356,527 +428,1327 @@ export interface Query { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Query$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Query<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Query { - export type InputObjectNested$SelectionSetArguments = { - input?: _RefDefs._InputObjectNested | undefined | null + export type InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | InputObjectNested$SelectionSet<$Scalars> + + export interface InputObjectNested$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `InputObjectNested` field. No arguments are required so you may omit this. + */ + $?: InputObjectNested$Arguments<$Scalars> } - export type InputObjectNested$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `InputObjectNested` field. - * No arguments are required so you may omit this. - */ - $?: InputObjectNested$SelectionSetArguments - } - > + + export interface InputObjectNested$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObjectNested<$Scalars> | undefined | null + } + + // --- expanded --- /** * This is the "expanded" version of the `InputObjectNested` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type InputObjectNested$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | InputObjectNested$SelectionSet - > + export type InputObjectNested$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | InputObjectNested$SelectionSet<$Scalars> + > - export type InputObjectNested = $Select.Indicator.Indicator | InputObjectNested$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type InputObjectNestedNonNull$SelectionSetArguments = { - input: _RefDefs._InputObjectNestedNonNull - } - export interface InputObjectNestedNonNull extends $Select.Bases.Base { + export type InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + InputObjectNestedNonNull$SelectionSet<$Scalars> + + export interface InputObjectNestedNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `InputObjectNestedNonNull` field. - * All arguments are required so you must include this. + * Arguments for `InputObjectNestedNonNull` field. All arguments are required so you must include this. */ - $: InputObjectNestedNonNull$SelectionSetArguments + $: InputObjectNestedNonNull$Arguments<$Scalars> } + export interface InputObjectNestedNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input: $NamedTypes.$InputObjectNestedNonNull<$Scalars> + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `InputObjectNestedNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type InputObjectNestedNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + InputObjectNestedNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type abcEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | abcEnum$SelectionSet<$Scalars> + + export interface abcEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `abcEnum` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type abcEnum$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type abcEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | abcEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type argInputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | argInputObjectCircular$SelectionSet<$Scalars> - export type abcEnum = $Select.Indicator.NoArgsIndicator + export interface argInputObjectCircular$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `argInputObjectCircular` field. No arguments are required so you may omit this. + */ + $?: argInputObjectCircular$Arguments<$Scalars> + } - export type argInputObjectCircular$SelectionSetArguments = { - input?: _RefDefs._InputObjectCircular | undefined | null + export interface argInputObjectCircular$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObjectCircular<$Scalars> | undefined | null } - export type argInputObjectCircular$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `argInputObjectCircular` field. - * No arguments are required so you may omit this. - */ - $?: argInputObjectCircular$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `argInputObjectCircular` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type argInputObjectCircular$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | argInputObjectCircular$SelectionSet - > + export type argInputObjectCircular$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | argInputObjectCircular$SelectionSet<$Scalars> + > - export type argInputObjectCircular = $Select.Indicator.Indicator | argInputObjectCircular$SelectionSet + // -------------------------------------------------------------------------------------------------- + + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArg$SelectionSet<$Scalars> - export type date = $Select.Indicator.NoArgsIndicator + export interface dateArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `dateArg` field. No arguments are required so you may omit this. + */ + $?: dateArg$Arguments<$Scalars> + } - export type dateArg$SelectionSetArguments = { - date?: $Scalar.DateDecoded | undefined | null + export interface dateArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null } - export type dateArg$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `dateArg` field. - * No arguments are required so you may omit this. - */ - $?: dateArg$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `dateArg` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArg$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | dateArg$SelectionSet> + export type dateArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArg$SelectionSet<$Scalars> + > - export type dateArg = $Select.Indicator.Indicator | dateArg$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type dateArgInputObject$SelectionSetArguments = { - input?: _RefDefs._InputObject | undefined | null + export type dateArgInputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArgInputObject$SelectionSet<$Scalars> + + export interface dateArgInputObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `dateArgInputObject` field. No arguments are required so you may omit this. + */ + $?: dateArgInputObject$Arguments<$Scalars> + } + + export interface dateArgInputObject$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObject<$Scalars> | undefined | null } - export type dateArgInputObject$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `dateArgInputObject` field. - * No arguments are required so you may omit this. - */ - $?: dateArgInputObject$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `dateArgInputObject` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArgInputObject$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | dateArgInputObject$SelectionSet - > + export type dateArgInputObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArgInputObject$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type dateArgInputObject = $Select.Indicator.Indicator | dateArgInputObject$SelectionSet + export type dateArgList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArgList$SelectionSet<$Scalars> - export type dateArgList$SelectionSetArguments = { - date?: Array<$Scalar.DateDecoded | undefined | null> | undefined | null + export interface dateArgList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `dateArgList` field. No arguments are required so you may omit this. + */ + $?: dateArgList$Arguments<$Scalars> } - export type dateArgList$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `dateArgList` field. - * No arguments are required so you may omit this. - */ - $?: dateArgList$SelectionSetArguments - } - > + + export interface dateArgList$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > + | undefined + | null + } + + // --- expanded --- /** * This is the "expanded" version of the `dateArgList` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArgList$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | dateArgList$SelectionSet> + export type dateArgList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArgList$SelectionSet<$Scalars> + > - export type dateArgList = $Select.Indicator.Indicator | dateArgList$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type dateArgNonNull$SelectionSetArguments = { - date: $Scalar.DateDecoded - } - export interface dateArgNonNull extends $Select.Bases.Base { + export type dateArgNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNull$SelectionSet<$Scalars> + + export interface dateArgNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `dateArgNonNull` field. - * All arguments are required so you must include this. + * Arguments for `dateArgNonNull` field. All arguments are required so you must include this. */ - $: dateArgNonNull$SelectionSetArguments + $: dateArgNonNull$Arguments<$Scalars> } - export type dateArgNonNullList$SelectionSetArguments = { - date: Array<$Scalar.DateDecoded | undefined | null> + export interface dateArgNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > } - export interface dateArgNonNullList extends $Select.Bases.Base { + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateArgNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateArgNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateArgNonNullList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNullList$SelectionSet<$Scalars> + + export interface dateArgNonNullList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `dateArgNonNullList` field. - * All arguments are required so you must include this. + * Arguments for `dateArgNonNullList` field. All arguments are required so you must include this. */ - $: dateArgNonNullList$SelectionSetArguments + $: dateArgNonNullList$Arguments<$Scalars> } - export type dateArgNonNullListNonNull$SelectionSetArguments = { - date: Array<$Scalar.DateDecoded | undefined | null> + export interface dateArgNonNullList$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > } - export interface dateArgNonNullListNonNull extends $Select.Bases.Base { + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateArgNonNullList` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateArgNonNullList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNullList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateArgNonNullListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNullListNonNull$SelectionSet<$Scalars> + + export interface dateArgNonNullListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `dateArgNonNullListNonNull` field. - * All arguments are required so you must include this. + * Arguments for `dateArgNonNullListNonNull` field. All arguments are required so you must include this. */ - $: dateArgNonNullListNonNull$SelectionSetArguments + $: dateArgNonNullListNonNull$Arguments<$Scalars> } - export interface dateInterface1 extends _RefDefs._DateInterface1 {} - export type dateInterface1$Expanded = dateInterface1 + export interface dateArgNonNullListNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateArgNonNullListNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateArgNonNullListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNullListNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateInterface1$SelectionSet<$Scalars> + + export interface dateInterface1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateInterface1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateInterface1` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateInterface1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateInterface1$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateList$SelectionSet<$Scalars> + + export interface dateList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `dateList` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateList$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateListList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateListList$SelectionSet<$Scalars> - export type dateList = $Select.Indicator.NoArgsIndicator + export interface dateListList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `dateListList` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateListList$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateListList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateListList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateListNonNull$SelectionSet<$Scalars> - export type dateListList = $Select.Indicator.NoArgsIndicator + export interface dateListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `dateListNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateListNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateListNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateNonNull$SelectionSet<$Scalars> - export type dateListNonNull = $Select.Indicator.NoArgsIndicator + export interface dateNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `dateNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = dateObject1$SelectionSet< + $Scalars + > + + export interface dateObject1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateObject1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateObject1` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateObject1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + dateObject1$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = dateUnion$SelectionSet<$Scalars> + + export interface dateUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateUnion` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + dateUnion$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type dateNonNull = $Select.Indicator.NoArgsIndicator + export type error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | error$SelectionSet<$Scalars> - export interface dateObject1 extends _RefDefs._DateObject1 {} - export type dateObject1$Expanded = dateObject1 - export interface dateUnion extends _RefDefs._DateUnion {} - export type dateUnion$Expanded = dateUnion - export type error$SelectionSetArguments = { + export interface error$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `error` field. No arguments are required so you may omit this. + */ + $?: error$Arguments<$Scalars> + } + + export interface error$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { case?: string | undefined | null } - export type error$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `error` field. - * No arguments are required so you may omit this. - */ - $?: error$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `error` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type error$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | error$SelectionSet> + export type error$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | error$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> - export type error = $Select.Indicator.Indicator | error$SelectionSet + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $interface$SelectionSet< + $Scalars + > + + export interface $interface$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `$interface` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $interface$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $interface$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type interfaceNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + interfaceNonNull$SelectionSet<$Scalars> + + export interface interfaceNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `interfaceNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type interfaceNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + interfaceNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type interfaceWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + interfaceWithArgs$SelectionSet<$Scalars> + + export interface interfaceWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + { + /** + * Arguments for `interfaceWithArgs` field. All arguments are required so you must include this. + */ + $: interfaceWithArgs$Arguments<$Scalars> + } + + export interface interfaceWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + id: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `interfaceWithArgs` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type interfaceWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + interfaceWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listInt$SelectionSet<$Scalars> + + export interface listInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listInt` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listInt$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listIntNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listIntNonNull$SelectionSet<$Scalars> + + export interface listIntNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listIntNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listIntNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listIntNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listListInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listListInt$SelectionSet<$Scalars> + + export interface listListInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listListInt` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listListInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listListInt$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listListIntNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listListIntNonNull$SelectionSet<$Scalars> + + export interface listListIntNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listListIntNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listListIntNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listListIntNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + lowerCaseUnion$SelectionSet<$Scalars> + + export interface lowerCaseUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$lowerCaseUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `lowerCaseUnion` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type lowerCaseUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + lowerCaseUnion$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $object<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $object$SelectionSet<$Scalars> + + export interface $object$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `$object` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $object$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $object$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectList$SelectionSet< + $Scalars + > + + export interface objectList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectList` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + objectList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + objectListNonNull$SelectionSet<$Scalars> + + export interface objectListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectListNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectListNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectNested$SelectionSet< + $Scalars + > + + export interface objectNested$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectNested<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectNested` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectNested$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectNested$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectNonNull$SelectionSet< + $Scalars + > + + export interface objectNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + objectWithArgs$SelectionSet<$Scalars> + + export interface objectWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + { + /** + * Arguments for `objectWithArgs` field. No arguments are required so you may omit this. + */ + $?: objectWithArgs$Arguments<$Scalars> + } + + export interface objectWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + boolean?: boolean | undefined | null + float?: number | undefined | null + id?: string | undefined | null + int?: number | undefined | null + string?: string | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectWithArgs` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = result$SelectionSet<$Scalars> + + export interface result$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Result<$Scalars> + { + /** + * Arguments for `result` field. All arguments are required so you must include this. + */ + $: result$Arguments<$Scalars> + } + + export interface result$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $case: $NamedTypes.$Case + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `result` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type result$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + result$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type resultNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = resultNonNull$SelectionSet< + $Scalars + > + + export interface resultNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Result<$Scalars> + { + /** + * Arguments for `resultNonNull` field. No arguments are required so you may omit this. + */ + $?: resultNonNull$Arguments<$Scalars> + } + + export interface resultNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $case?: $NamedTypes.$Case | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `resultNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type resultNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + resultNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $string<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + + export interface $string$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `$string` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $string$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgEnum$SelectionSet<$Scalars> + + export interface stringWithArgEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithArgEnum` field. No arguments are required so you may omit this. + */ + $?: stringWithArgEnum$Arguments<$Scalars> + } + + export interface stringWithArgEnum$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $ABCEnum?: $NamedTypes.$ABCEnum | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `stringWithArgEnum` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithArgEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgInputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgInputObject$SelectionSet<$Scalars> + + export interface stringWithArgInputObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithArgInputObject` field. No arguments are required so you may omit this. + */ + $?: stringWithArgInputObject$Arguments<$Scalars> + } + + export interface stringWithArgInputObject$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObject<$Scalars> | undefined | null + } - export type id = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithArgInputObject` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithArgInputObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgInputObject$SelectionSet<$Scalars> + > - export type idNonNull = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export interface $interface extends _RefDefs._Interface {} - export type $interface$Expanded = $interface - export interface interfaceNonNull extends _RefDefs._Interface {} - export type interfaceNonNull$Expanded = interfaceNonNull - export interface interfaceWithArgs extends _RefDefs._Interface { + export type stringWithArgInputObjectRequired<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithArgInputObjectRequired$SelectionSet<$Scalars> + + export interface stringWithArgInputObjectRequired$SelectionSet< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, + > extends $Select.Bases.Base { /** - * Arguments for `interfaceWithArgs` field. - * All arguments are required so you must include this. + * Arguments for `stringWithArgInputObjectRequired` field. All arguments are required so you must include this. */ - $: { - id: string - } + $: stringWithArgInputObjectRequired$Arguments<$Scalars> + } + + export interface stringWithArgInputObjectRequired$Arguments< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, + > { + input: $NamedTypes.$InputObject<$Scalars> } - export type interfaceWithArgs$Expanded = interfaceWithArgs + + // --- expanded --- + /** - * This is the "expanded" version of the `listInt` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithArgInputObjectRequired` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithArgInputObjectRequired$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithArgInputObjectRequired$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgs$SelectionSet<$Scalars> + + export interface stringWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithArgs` field. No arguments are required so you may omit this. + */ + $?: stringWithArgs$Arguments<$Scalars> + } + + export interface stringWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + boolean?: boolean | undefined | null + float?: number | undefined | null + id?: string | undefined | null + int?: number | undefined | null + string?: string | undefined | null + } - export type listInt = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the `listIntNonNull` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithArgs` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listIntNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithListArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithListArg$SelectionSet<$Scalars> + + export interface stringWithListArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithListArg` field. No arguments are required so you may omit this. + */ + $?: stringWithListArg$Arguments<$Scalars> + } + + export interface stringWithListArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ints?: Array | undefined | null + } - export type listIntNonNull = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the `listListInt` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithListArg` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listListInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithListArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithListArg$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithListArgRequired<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithListArgRequired$SelectionSet<$Scalars> + + export interface stringWithListArgRequired$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithListArgRequired` field. All arguments are required so you must include this. + */ + $: stringWithListArgRequired$Arguments<$Scalars> + } - export type listListInt = $Select.Indicator.NoArgsIndicator + export interface stringWithListArgRequired$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ints: Array + } + + // --- expanded --- /** - * This is the "expanded" version of the `listListIntNonNull` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithListArgRequired` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listListIntNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithListArgRequired$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithListArgRequired$SelectionSet<$Scalars> + > - export type listListIntNonNull = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export interface lowerCaseUnion extends _RefDefs._lowerCaseUnion {} - export type lowerCaseUnion$Expanded = lowerCaseUnion - export interface $object extends _RefDefs._Object1 {} - export type $object$Expanded = $object - export interface objectList extends _RefDefs._Object1 {} - export type objectList$Expanded = objectList - export interface objectListNonNull extends _RefDefs._Object1 {} - export type objectListNonNull$Expanded = objectListNonNull - export interface objectNested extends _RefDefs._ObjectNested {} - export type objectNested$Expanded = objectNested - export interface objectNonNull extends _RefDefs._Object1 {} - export type objectNonNull$Expanded = objectNonNull - export interface objectWithArgs extends _RefDefs._Object1 { - /** - * Arguments for `objectWithArgs` field. - * No arguments are required so you may omit this. - */ - $?: { - boolean?: boolean | undefined | null - float?: number | undefined | null - id?: string | undefined | null - int?: number | undefined | null - string?: string | undefined | null - } - } - export type objectWithArgs$Expanded = objectWithArgs - export interface result extends _RefDefs._Result { + export type stringWithRequiredArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithRequiredArg$SelectionSet<$Scalars> + + export interface stringWithRequiredArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `result` field. - * All arguments are required so you must include this. + * Arguments for `stringWithRequiredArg` field. All arguments are required so you must include this. */ - $: { - $case: _RefDefs._Case - } + $: stringWithRequiredArg$Arguments<$Scalars> } - export type result$Expanded = result - export interface resultNonNull extends _RefDefs._Result { - /** - * Arguments for `resultNonNull` field. - * No arguments are required so you may omit this. - */ - $?: { - $case?: _RefDefs._Case | undefined | null - } + + export interface stringWithRequiredArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + string: string } - export type resultNonNull$Expanded = resultNonNull + + // --- expanded --- + /** - * This is the "expanded" version of the `$string` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithRequiredArg` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $string$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithRequiredArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithRequiredArg$SelectionSet<$Scalars> + > - export type $string = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export type stringWithArgEnum$SelectionSetArguments = { - $ABCEnum?: _RefDefs._ABCEnum | undefined | null - } - export type stringWithArgEnum$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithArgEnum` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgEnum$SelectionSetArguments - } + export type unionFooBar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = unionFooBar$SelectionSet< + $Scalars > + export interface unionFooBar$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- + /** - * This is the "expanded" version of the `stringWithArgEnum` type. It is identical except for the fact + * This is the "expanded" version of the `unionFooBar` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgEnum$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgEnum$SelectionSet + export type unionFooBar$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + unionFooBar$SelectionSet<$Scalars> > - export type stringWithArgEnum = $Select.Indicator.Indicator | stringWithArgEnum$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithArgInputObject$SelectionSetArguments = { - input?: _RefDefs._InputObject | undefined | null - } - export type stringWithArgInputObject$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithArgInputObject` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgInputObject$SelectionSetArguments - } - > + export type unionFooBarNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionFooBarNonNull$SelectionSet<$Scalars> + + export interface unionFooBarNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- /** - * This is the "expanded" version of the `stringWithArgInputObject` type. It is identical except for the fact + * This is the "expanded" version of the `unionFooBarNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgInputObject$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgInputObject$SelectionSet - > + export type unionFooBarNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionFooBarNonNull$SelectionSet<$Scalars> + > - export type stringWithArgInputObject = $Select.Indicator.Indicator | stringWithArgInputObject$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithArgInputObjectRequired$SelectionSetArguments = { - input: _RefDefs._InputObject - } - export interface stringWithArgInputObjectRequired extends $Select.Bases.Base { + export type unionFooBarWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionFooBarWithArgs$SelectionSet<$Scalars> + + export interface unionFooBarWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + { /** - * Arguments for `stringWithArgInputObjectRequired` field. - * All arguments are required so you must include this. + * Arguments for `unionFooBarWithArgs` field. No arguments are required so you may omit this. */ - $: stringWithArgInputObjectRequired$SelectionSetArguments + $?: unionFooBarWithArgs$Arguments<$Scalars> } - export type stringWithArgs$SelectionSetArguments = { - boolean?: boolean | undefined | null - float?: number | undefined | null + export interface unionFooBarWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { id?: string | undefined | null - int?: number | undefined | null - string?: string | undefined | null } - export type stringWithArgs$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithArgs` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgs$SelectionSetArguments - } - > + + // --- expanded --- /** - * This is the "expanded" version of the `stringWithArgs` type. It is identical except for the fact + * This is the "expanded" version of the `unionFooBarWithArgs` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgs$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgs$SelectionSet - > + export type unionFooBarWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionFooBarWithArgs$SelectionSet<$Scalars> + > - export type stringWithArgs = $Select.Indicator.Indicator | stringWithArgs$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithListArg$SelectionSetArguments = { - ints?: Array | undefined | null - } - export type stringWithListArg$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithListArg` field. - * No arguments are required so you may omit this. - */ - $?: stringWithListArg$SelectionSetArguments - } + export type unionObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = unionObject$SelectionSet< + $Scalars > + export interface unionObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectUnion<$Scalars> + {} + + // --- expanded --- + /** - * This is the "expanded" version of the `stringWithListArg` type. It is identical except for the fact + * This is the "expanded" version of the `unionObject` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithListArg$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithListArg$SelectionSet + export type unionObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + unionObject$SelectionSet<$Scalars> > - export type stringWithListArg = $Select.Indicator.Indicator | stringWithListArg$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithListArgRequired$SelectionSetArguments = { - ints: Array - } - export interface stringWithListArgRequired extends $Select.Bases.Base { - /** - * Arguments for `stringWithListArgRequired` field. - * All arguments are required so you must include this. - */ - $: stringWithListArgRequired$SelectionSetArguments - } + export type unionObjectNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionObjectNonNull$SelectionSet<$Scalars> - export type stringWithRequiredArg$SelectionSetArguments = { - string: string - } - export interface stringWithRequiredArg extends $Select.Bases.Base { - /** - * Arguments for `stringWithRequiredArg` field. - * All arguments are required so you must include this. - */ - $: stringWithRequiredArg$SelectionSetArguments - } + export interface unionObjectNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectUnion<$Scalars> + {} - export interface unionFooBar extends _RefDefs._FooBarUnion {} - export type unionFooBar$Expanded = unionFooBar - export interface unionFooBarNonNull extends _RefDefs._FooBarUnion {} - export type unionFooBarNonNull$Expanded = unionFooBarNonNull - export interface unionFooBarWithArgs extends _RefDefs._FooBarUnion { - /** - * Arguments for `unionFooBarWithArgs` field. - * No arguments are required so you may omit this. - */ - $?: { - id?: string | undefined | null - } - } - export type unionFooBarWithArgs$Expanded = unionFooBarWithArgs - export interface unionObject extends _RefDefs._ObjectUnion {} - export type unionObject$Expanded = unionObject - export interface unionObjectNonNull extends _RefDefs._ObjectUnion {} - export type unionObjectNonNull$Expanded = unionObjectNonNull + // --- expanded --- + + /** + * This is the "expanded" version of the `unionObjectNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type unionObjectNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionObjectNonNull$SelectionSet<$Scalars> + > } // @@ -923,24 +1795,36 @@ export type Case = 'ErrorOne' | 'ErrorTwo' | 'Object1' // // -export interface InputObject { - date?: $Scalar.DateDecoded | undefined | null - dateRequired: $Scalar.DateDecoded +export interface InputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + dateRequired: $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > id?: string | undefined | null idRequired: string } -export interface InputObjectCircular { - circular?: _RefDefs._InputObjectCircular | undefined | null - date?: $Scalar.DateDecoded | undefined | null +export interface InputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + circular?: $NamedTypes.$InputObjectCircular<$Scalars> | undefined | null + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null } -export interface InputObjectNested { - InputObject?: _RefDefs._InputObject | undefined | null +export interface InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + InputObject?: $NamedTypes.$InputObject<$Scalars> | undefined | null } -export interface InputObjectNestedNonNull { - InputObject: _RefDefs._InputObject +export interface InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + InputObject: $NamedTypes.$InputObject<$Scalars> } // @@ -959,13 +1843,14 @@ export interface InputObjectNestedNonNull { // // -// -------------- -// Interface Type DateInterface1 -// -------------- +// Interface Type: DateInterface1 +// -------------------------------------------------------------------------------------------------- -export interface DateInterface1 extends $Select.Bases.ObjectLike { - date1?: DateInterface1.date1 - ___on_DateObject1?: DateObject1 +export interface DateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + date1?: DateInterface1.date1<$Scalars> + ___on_DateObject1?: DateObject1<$Scalars> /** * Inline fragments for field groups. @@ -975,7 +1860,9 @@ export interface DateInterface1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateInterface1$FragmentInline | DateInterface1$FragmentInline[] + ___?: + | DateInterface1$FragmentInline<$Scalars> + | DateInterface1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -988,29 +1875,39 @@ export interface DateInterface1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateInterface1$FragmentInline - extends DateInterface1, $Select.Directive.$Groups.InlineFragment.Fields +export interface DateInterface1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateInterface1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} export namespace DateInterface1 { + export type date1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + + export interface date1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date1` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date1$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date1 = $Select.Indicator.NoArgsIndicator + export type date1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + > } -// -------------- -// Interface Type Error -// -------------- +// Interface Type: Error +// -------------------------------------------------------------------------------------------------- -export interface Error extends $Select.Bases.ObjectLike { - message?: Error.message - ___on_ErrorOne?: ErrorOne - ___on_ErrorTwo?: ErrorTwo +export interface Error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { + message?: Error.message<$Scalars> + ___on_ErrorOne?: ErrorOne<$Scalars> + ___on_ErrorTwo?: ErrorTwo<$Scalars> /** * Inline fragments for field groups. @@ -1020,7 +1917,9 @@ export interface Error extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Error$FragmentInline | Error$FragmentInline[] + ___?: + | Error$FragmentInline<$Scalars> + | Error$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -1033,27 +1932,41 @@ export interface Error extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Error$FragmentInline extends Error, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Error$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Error<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Error { + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `message` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } -// -------------- -// Interface Type Interface -// -------------- +// Interface Type: Interface +// -------------------------------------------------------------------------------------------------- -export interface Interface extends $Select.Bases.ObjectLike { - id?: Interface.id - ___on_Object1ImplementingInterface?: Object1ImplementingInterface - ___on_Object2ImplementingInterface?: Object2ImplementingInterface +export interface Interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + id?: Interface.id<$Scalars> + ___on_Object1ImplementingInterface?: Object1ImplementingInterface<$Scalars> + ___on_Object2ImplementingInterface?: Object2ImplementingInterface<$Scalars> /** * Inline fragments for field groups. @@ -1063,7 +1976,9 @@ export interface Interface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Interface$FragmentInline | Interface$FragmentInline[] + ___?: + | Interface$FragmentInline<$Scalars> + | Interface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -1076,17 +1991,30 @@ export interface Interface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Interface$FragmentInline extends Interface, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Interface$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Interface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Interface { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1119,11 +2047,11 @@ export namespace Interface { // ----------------------------------------| Entrypoint Interface | -export interface Bar extends $Select.Bases.ObjectLike { +export interface Bar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the `int` field on the `Bar` object. Its type is `Int` (a `Scalar`). */ - int?: Bar.int$Expanded | $Select.SelectAlias.SelectAlias + int?: Bar.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1133,7 +2061,9 @@ export interface Bar extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Bar$FragmentInline | Bar$FragmentInline[] + ___?: + | Bar$FragmentInline<$Scalars> + | Bar$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1145,19 +2075,32 @@ export interface Bar extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Bar$FragmentInline extends Bar, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Bar$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Bar<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Bar { + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -1174,11 +2117,13 @@ export namespace Bar { // ----------------------------------------| Entrypoint Interface | -export interface DateObject1 extends $Select.Bases.ObjectLike { +export interface DateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `date1` field on the `DateObject1` object. Its type is `Date` (a `Scalar`). */ - date1?: DateObject1.date1$Expanded | $Select.SelectAlias.SelectAlias + date1?: DateObject1.date1$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1188,7 +2133,9 @@ export interface DateObject1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateObject1$FragmentInline | DateObject1$FragmentInline[] + ___?: + | DateObject1$FragmentInline<$Scalars> + | DateObject1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1200,19 +2147,32 @@ export interface DateObject1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateObject1$FragmentInline extends DateObject1, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateObject1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateObject1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace DateObject1 { + export type date1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + + export interface date1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date1` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date1$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date1 = $Select.Indicator.NoArgsIndicator + export type date1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + > } // @@ -1229,11 +2189,13 @@ export namespace DateObject1 { // ----------------------------------------| Entrypoint Interface | -export interface DateObject2 extends $Select.Bases.ObjectLike { +export interface DateObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `date2` field on the `DateObject2` object. Its type is `Date` (a `Scalar`). */ - date2?: DateObject2.date2$Expanded | $Select.SelectAlias.SelectAlias + date2?: DateObject2.date2$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1243,7 +2205,9 @@ export interface DateObject2 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateObject2$FragmentInline | DateObject2$FragmentInline[] + ___?: + | DateObject2$FragmentInline<$Scalars> + | DateObject2$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1255,19 +2219,32 @@ export interface DateObject2 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateObject2$FragmentInline extends DateObject2, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateObject2$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateObject2<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace DateObject2 { + export type date2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date2$SelectionSet<$Scalars> + + export interface date2$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date2` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date2$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date2 = $Select.Indicator.NoArgsIndicator + export type date2$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date2$SelectionSet<$Scalars> + > } // @@ -1284,15 +2261,17 @@ export namespace DateObject2 { // ----------------------------------------| Entrypoint Interface | -export interface ErrorOne extends $Select.Bases.ObjectLike { +export interface ErrorOne<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `infoId` field on the `ErrorOne` object. Its type is `ID` (a `Scalar`). */ - infoId?: ErrorOne.infoId$Expanded | $Select.SelectAlias.SelectAlias + infoId?: ErrorOne.infoId$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `message` field on the `ErrorOne` object. Its type is `String` (a `Scalar`). */ - message?: ErrorOne.message$Expanded | $Select.SelectAlias.SelectAlias + message?: ErrorOne.message$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1302,7 +2281,9 @@ export interface ErrorOne extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ErrorOne$FragmentInline | ErrorOne$FragmentInline[] + ___?: + | ErrorOne$FragmentInline<$Scalars> + | ErrorOne$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1314,28 +2295,54 @@ export interface ErrorOne extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ErrorOne$FragmentInline extends ErrorOne, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ErrorOne$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ErrorOne<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ErrorOne { + export type infoId<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | infoId$SelectionSet<$Scalars> + + export interface infoId$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `infoId` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type infoId$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type infoId$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | infoId$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> - export type infoId = $Select.Indicator.NoArgsIndicator + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `message` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } // @@ -1352,15 +2359,17 @@ export namespace ErrorOne { // ----------------------------------------| Entrypoint Interface | -export interface ErrorTwo extends $Select.Bases.ObjectLike { +export interface ErrorTwo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `infoInt` field on the `ErrorTwo` object. Its type is `Int` (a `Scalar`). */ - infoInt?: ErrorTwo.infoInt$Expanded | $Select.SelectAlias.SelectAlias + infoInt?: ErrorTwo.infoInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `message` field on the `ErrorTwo` object. Its type is `String` (a `Scalar`). */ - message?: ErrorTwo.message$Expanded | $Select.SelectAlias.SelectAlias + message?: ErrorTwo.message$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1370,7 +2379,9 @@ export interface ErrorTwo extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ErrorTwo$FragmentInline | ErrorTwo$FragmentInline[] + ___?: + | ErrorTwo$FragmentInline<$Scalars> + | ErrorTwo$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1382,28 +2393,54 @@ export interface ErrorTwo extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ErrorTwo$FragmentInline extends ErrorTwo, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ErrorTwo$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ErrorTwo<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ErrorTwo { + export type infoInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | infoInt$SelectionSet<$Scalars> + + export interface infoInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `infoInt` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type infoInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type infoInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | infoInt$SelectionSet<$Scalars> + > - export type infoInt = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `message` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } // @@ -1423,11 +2460,11 @@ export namespace ErrorTwo { /** * Object documentation. */ -export interface Foo extends $Select.Bases.ObjectLike { +export interface Foo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the `id` field on the `Foo` object. Its type is `ID` (a `Scalar`). */ - id?: Foo.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Foo.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1437,7 +2474,9 @@ export interface Foo extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Foo$FragmentInline | Foo$FragmentInline[] + ___?: + | Foo$FragmentInline<$Scalars> + | Foo$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1449,19 +2488,32 @@ export interface Foo extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Foo$FragmentInline extends Foo, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Foo$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Foo<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Foo { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1478,27 +2530,33 @@ export namespace Foo { // ----------------------------------------| Entrypoint Interface | -export interface Object1 extends $Select.Bases.ObjectLike { +export interface Object1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + /** + * Select the `ABCEnum` field on the `Object1` object. Its type is Enum. + */ + ABCEnum?: Object1.ABCEnum$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `boolean` field on the `Object1` object. Its type is `Boolean` (a `Scalar`). */ - boolean?: Object1.$boolean$Expanded | $Select.SelectAlias.SelectAlias + boolean?: Object1.$boolean$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `float` field on the `Object1` object. Its type is `Float` (a `Scalar`). */ - float?: Object1.float$Expanded | $Select.SelectAlias.SelectAlias + float?: Object1.float$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Object1` object. Its type is `ID` (a `Scalar`). */ - id?: Object1.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Object1.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `int` field on the `Object1` object. Its type is `Int` (a `Scalar`). */ - int?: Object1.int$Expanded | $Select.SelectAlias.SelectAlias + int?: Object1.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `string` field on the `Object1` object. Its type is `String` (a `Scalar`). */ - string?: Object1.$string$Expanded | $Select.SelectAlias.SelectAlias + string?: Object1.$string$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1508,7 +2566,9 @@ export interface Object1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object1$FragmentInline | Object1$FragmentInline[] + ___?: + | Object1$FragmentInline<$Scalars> + | Object1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1520,55 +2580,142 @@ export interface Object1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object1$FragmentInline extends Object1, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Object1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Object1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object1 { + export type ABCEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | ABCEnum$SelectionSet<$Scalars> + + export interface ABCEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `ABCEnum` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type ABCEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | ABCEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $boolean<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + + export interface $boolean$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `$boolean` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $boolean$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $boolean$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + > - export type $boolean = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type float<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | float$SelectionSet<$Scalars> + + export interface float$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `float` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type float$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type float$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | float$SelectionSet<$Scalars> + > - export type float = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > - export type id = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > - export type int = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type $string<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + + export interface $string$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `$string` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $string$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type $string = $Select.Indicator.NoArgsIndicator + export type $string$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + > } // @@ -1585,15 +2732,21 @@ export namespace Object1 { // ----------------------------------------| Entrypoint Interface | -export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { +export interface Object1ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `id` field on the `Object1ImplementingInterface` object. Its type is `ID` (a `Scalar`). */ - id?: Object1ImplementingInterface.id$Expanded | $Select.SelectAlias.SelectAlias + id?: + | Object1ImplementingInterface.id$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `int` field on the `Object1ImplementingInterface` object. Its type is `Int` (a `Scalar`). */ - int?: Object1ImplementingInterface.int$Expanded | $Select.SelectAlias.SelectAlias + int?: + | Object1ImplementingInterface.int$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1603,7 +2756,9 @@ export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object1ImplementingInterface$FragmentInline | Object1ImplementingInterface$FragmentInline[] + ___?: + | Object1ImplementingInterface$FragmentInline<$Scalars> + | Object1ImplementingInterface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1615,30 +2770,54 @@ export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object1ImplementingInterface$FragmentInline - extends Object1ImplementingInterface, $Select.Directive.$Groups.InlineFragment.Fields -{} +export interface Object1ImplementingInterface$FragmentInline< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, +> extends Object1ImplementingInterface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object1ImplementingInterface { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -1655,17 +2834,21 @@ export namespace Object1ImplementingInterface { // ----------------------------------------| Entrypoint Interface | -export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { +export interface Object2ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `boolean` field on the `Object2ImplementingInterface` object. Its type is `Boolean` (a `Scalar`). */ boolean?: - | Object2ImplementingInterface.$boolean$Expanded - | $Select.SelectAlias.SelectAlias + | Object2ImplementingInterface.$boolean$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Object2ImplementingInterface` object. Its type is `ID` (a `Scalar`). */ - id?: Object2ImplementingInterface.id$Expanded | $Select.SelectAlias.SelectAlias + id?: + | Object2ImplementingInterface.id$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1675,7 +2858,9 @@ export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object2ImplementingInterface$FragmentInline | Object2ImplementingInterface$FragmentInline[] + ___?: + | Object2ImplementingInterface$FragmentInline<$Scalars> + | Object2ImplementingInterface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1687,30 +2872,54 @@ export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object2ImplementingInterface$FragmentInline - extends Object2ImplementingInterface, $Select.Directive.$Groups.InlineFragment.Fields -{} +export interface Object2ImplementingInterface$FragmentInline< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, +> extends Object2ImplementingInterface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object2ImplementingInterface { + export type $boolean<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + + export interface $boolean$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `$boolean` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $boolean$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $boolean$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + > - export type $boolean = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1727,15 +2936,17 @@ export namespace Object2ImplementingInterface { // ----------------------------------------| Entrypoint Interface | -export interface ObjectNested extends $Select.Bases.ObjectLike { +export interface ObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `id` field on the `ObjectNested` object. Its type is `ID` (a `Scalar`). */ - id?: ObjectNested.id$Expanded | $Select.SelectAlias.SelectAlias + id?: ObjectNested.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `object` field on the `ObjectNested` object. Its type is Object. */ - object?: ObjectNested.$object$Expanded | $Select.SelectAlias.SelectAlias + object?: ObjectNested.$object$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1745,7 +2956,9 @@ export interface ObjectNested extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ObjectNested$FragmentInline | ObjectNested$FragmentInline[] + ___?: + | ObjectNested$FragmentInline<$Scalars> + | ObjectNested$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1757,22 +2970,51 @@ export interface ObjectNested extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ObjectNested$FragmentInline extends ObjectNested, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ObjectNested$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ObjectNested<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ObjectNested { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $object<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $object$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface $object$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} - export interface $object extends _RefDefs._Object1 {} - export type $object$Expanded = $object + // --- expanded --- + + /** + * This is the "expanded" version of the `$object` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $object$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $object$SelectionSet<$Scalars> + > } // @@ -1789,11 +3031,15 @@ export namespace ObjectNested { // ----------------------------------------| Entrypoint Interface | -export interface ObjectUnion extends $Select.Bases.ObjectLike { +export interface ObjectUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `fooBarUnion` field on the `ObjectUnion` object. Its type is Union. */ - fooBarUnion?: ObjectUnion.fooBarUnion$Expanded | $Select.SelectAlias.SelectAlias + fooBarUnion?: + | ObjectUnion.fooBarUnion$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1803,7 +3049,9 @@ export interface ObjectUnion extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ObjectUnion$FragmentInline | ObjectUnion$FragmentInline[] + ___?: + | ObjectUnion$FragmentInline<$Scalars> + | ObjectUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1815,13 +3063,31 @@ export interface ObjectUnion extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ObjectUnion$FragmentInline extends ObjectUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ObjectUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ObjectUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ObjectUnion { - export interface fooBarUnion extends _RefDefs._FooBarUnion {} - export type fooBarUnion$Expanded = fooBarUnion + export type fooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = fooBarUnion$SelectionSet< + $Scalars + > + + export interface fooBarUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `fooBarUnion` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type fooBarUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + fooBarUnion$SelectionSet<$Scalars> + > } // @@ -1838,11 +3104,13 @@ export namespace ObjectUnion { // ----------------------------------------| Entrypoint Interface | -export interface lowerCaseObject extends $Select.Bases.ObjectLike { +export interface lowerCaseObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `id` field on the `lowerCaseObject` object. Its type is `ID` (a `Scalar`). */ - id?: lowerCaseObject.id$Expanded | $Select.SelectAlias.SelectAlias + id?: lowerCaseObject.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1852,7 +3120,9 @@ export interface lowerCaseObject extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseObject$FragmentInline | lowerCaseObject$FragmentInline[] + ___?: + | lowerCaseObject$FragmentInline<$Scalars> + | lowerCaseObject$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1864,21 +3134,32 @@ export interface lowerCaseObject extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseObject$FragmentInline - extends lowerCaseObject, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseObject$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseObject<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace lowerCaseObject { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1895,11 +3176,13 @@ export namespace lowerCaseObject { // ----------------------------------------| Entrypoint Interface | -export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { +export interface lowerCaseObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `int` field on the `lowerCaseObject2` object. Its type is `Int` (a `Scalar`). */ - int?: lowerCaseObject2.int$Expanded | $Select.SelectAlias.SelectAlias + int?: lowerCaseObject2.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1909,7 +3192,9 @@ export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseObject2$FragmentInline | lowerCaseObject2$FragmentInline[] + ___?: + | lowerCaseObject2$FragmentInline<$Scalars> + | lowerCaseObject2$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1921,21 +3206,32 @@ export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseObject2$FragmentInline - extends lowerCaseObject2, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseObject2$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseObject2<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace lowerCaseObject2 { + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -1954,9 +3250,9 @@ export namespace lowerCaseObject2 { // // -export interface DateUnion { - ___on_DateObject1?: DateObject1 - ___on_DateObject2?: DateObject2 +export interface DateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_DateObject1?: DateObject1<$Scalars> + ___on_DateObject2?: DateObject2<$Scalars> /** * Inline fragments for field groups. @@ -1966,7 +3262,9 @@ export interface DateUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateUnion$FragmentInline | DateUnion$FragmentInline[] + ___?: + | DateUnion$FragmentInline<$Scalars> + | DateUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -1978,14 +3276,16 @@ export interface DateUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateUnion$FragmentInline extends DateUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} /** * Union documentation. */ -export interface FooBarUnion { - ___on_Bar?: Bar - ___on_Foo?: Foo +export interface FooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_Bar?: Bar<$Scalars> + ___on_Foo?: Foo<$Scalars> /** * Inline fragments for field groups. @@ -1995,7 +3295,9 @@ export interface FooBarUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: FooBarUnion$FragmentInline | FooBarUnion$FragmentInline[] + ___?: + | FooBarUnion$FragmentInline<$Scalars> + | FooBarUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -2007,12 +3309,14 @@ export interface FooBarUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface FooBarUnion$FragmentInline extends FooBarUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface FooBarUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends FooBarUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -export interface Result { - ___on_ErrorOne?: ErrorOne - ___on_ErrorTwo?: ErrorTwo - ___on_Object1?: Object1 +export interface Result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_ErrorOne?: ErrorOne<$Scalars> + ___on_ErrorTwo?: ErrorTwo<$Scalars> + ___on_Object1?: Object1<$Scalars> /** * Inline fragments for field groups. @@ -2022,7 +3326,9 @@ export interface Result { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Result$FragmentInline | Result$FragmentInline[] + ___?: + | Result$FragmentInline<$Scalars> + | Result$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -2034,11 +3340,13 @@ export interface Result { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Result$FragmentInline extends Result, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Result$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Result<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -export interface lowerCaseUnion { - ___on_lowerCaseObject?: lowerCaseObject - ___on_lowerCaseObject2?: lowerCaseObject2 +export interface lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_lowerCaseObject?: lowerCaseObject<$Scalars> + ___on_lowerCaseObject2?: lowerCaseObject2<$Scalars> /** * Inline fragments for field groups. @@ -2048,7 +3356,9 @@ export interface lowerCaseUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseUnion$FragmentInline | lowerCaseUnion$FragmentInline[] + ___?: + | lowerCaseUnion$FragmentInline<$Scalars> + | lowerCaseUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -2060,8 +3370,8 @@ export interface lowerCaseUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseUnion$FragmentInline - extends lowerCaseUnion, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} /** @@ -2071,33 +3381,42 @@ export interface lowerCaseUnion$FragmentInline * For example imagine `Query.Foo` field with type also called `Foo`. Our generated interfaces for each field * would end up with an error of `export interface Foo extends Foo ...` */ -export namespace _RefDefs { - export type _Mutation = Mutation - export type _Query = Query - export type _ABCEnum = ABCEnum - export type _Case = Case - export type _InputObject = InputObject - export type _InputObjectCircular = InputObjectCircular - export type _InputObjectNested = InputObjectNested - export type _InputObjectNestedNonNull = InputObjectNestedNonNull - export type _DateInterface1 = DateInterface1 - export type _Error = Error - export type _Interface = Interface - export type _Bar = Bar - export type _DateObject1 = DateObject1 - export type _DateObject2 = DateObject2 - export type _ErrorOne = ErrorOne - export type _ErrorTwo = ErrorTwo - export type _Foo = Foo - export type _Object1 = Object1 - export type _Object1ImplementingInterface = Object1ImplementingInterface - export type _Object2ImplementingInterface = Object2ImplementingInterface - export type _ObjectNested = ObjectNested - export type _ObjectUnion = ObjectUnion - export type _lowerCaseObject = lowerCaseObject - export type _lowerCaseObject2 = lowerCaseObject2 - export type _DateUnion = DateUnion - export type _FooBarUnion = FooBarUnion - export type _Result = Result - export type _lowerCaseUnion = lowerCaseUnion +export namespace $NamedTypes { + export type $Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Mutation<$Scalars> + export type $Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Query<$Scalars> + export type $ABCEnum = ABCEnum + export type $Case = Case + export type $InputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObject<$Scalars> + export type $InputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObjectCircular< + $Scalars + > + export type $InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObjectNested< + $Scalars + > + export type $InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + InputObjectNestedNonNull<$Scalars> + export type $DateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateInterface1<$Scalars> + export type $Error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Error<$Scalars> + export type $Interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Interface<$Scalars> + export type $Bar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Bar<$Scalars> + export type $DateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateObject1<$Scalars> + export type $DateObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateObject2<$Scalars> + export type $ErrorOne<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ErrorOne<$Scalars> + export type $ErrorTwo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ErrorTwo<$Scalars> + export type $Foo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Foo<$Scalars> + export type $Object1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Object1<$Scalars> + export type $Object1ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + Object1ImplementingInterface<$Scalars> + export type $Object2ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + Object2ImplementingInterface<$Scalars> + export type $ObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ObjectNested<$Scalars> + export type $ObjectUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ObjectUnion<$Scalars> + export type $lowerCaseObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseObject<$Scalars> + export type $lowerCaseObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseObject2< + $Scalars + > + export type $DateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateUnion<$Scalars> + export type $FooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = FooBarUnion<$Scalars> + export type $Result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Result<$Scalars> + export type $lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseUnion<$Scalars> } diff --git a/src/extensions/Upload/Upload.test.ts b/src/extensions/Upload/Upload.test.ts index 315d2401b..c336f1f92 100644 --- a/src/extensions/Upload/Upload.test.ts +++ b/src/extensions/Upload/Upload.test.ts @@ -7,25 +7,12 @@ import { Graffle } from '../../entrypoints/main.js' import { Upload } from './Upload.js' import { type SchemaService, serveSchema } from '../../../tests/_/lib/serveSchema.js' +import type { ClientContext } from '../../entrypoints/utilities-for-generated.js' import type { Client } from '../../layers/6_client/client.js' -import type { OutputConfigDefault, TransportConfigHttp } from '../../layers/6_client/Settings/Config.js' let schemaServer: SchemaService -let graffle: Client<{ - config: { - schemaMap: null - transport: TransportConfigHttp - output: OutputConfigDefault - initialInput: { schema: URL } - name: 'default' - typeHooks: { - property: [] - onRequestDocumentRootType: [] - onRequestResult: [] - } - } -}> +let graffle: Client beforeAll(async () => { schemaServer = await serveSchema({ schema }) diff --git a/src/generator/config/config.ts b/src/generator/config/config.ts index afe4d07e1..1c93fb3ed 100644 --- a/src/generator/config/config.ts +++ b/src/generator/config/config.ts @@ -25,6 +25,10 @@ export interface Config { operationVariables: boolean } options: { + /** + * Does the generated client import custom scalars statically from the user's project? + */ + isImportsCustomScalars: boolean defaultSchemaUrl: URL | null format: boolean customScalars: boolean @@ -79,16 +83,15 @@ export const createConfig = async (input: Input): Promise => { ? toAbsolutePath(cwd, input.customScalarCodecs) : Path.join(sourceDirPath, `customScalarCodecs.ts`) - const customScalarCodecsPathExists = await fileExists(inputPathCustomScalarCodecs) - if (!customScalarCodecsPathExists && input.customScalarCodecs) { + const isCustomScalarsModuleExists = await fileExists(inputPathCustomScalarCodecs) + if (!isCustomScalarsModuleExists && input.customScalarCodecs) { + // dprint-ignore throw new Error( - `Custom scalar codecs file not found. Given path: ${ - String(input.customScalarCodecs) - }. Resolved to and looked at: ${inputPathCustomScalarCodecs}`, + `Custom scalar codecs file not found. Given path: ${String(input.customScalarCodecs)}. Resolved to and looked at: ${inputPathCustomScalarCodecs}`, ) } - const customScalarCodecsImportPath = Path.relative( + const customScalarsImportPath = Path.relative( outputDirPathModules, inputPathCustomScalarCodecs.replace(/\.ts$/, `.js`), ) @@ -148,6 +151,8 @@ export const createConfig = async (input: Input): Promise => { // --- Config --- + // const customScalarsEnabled = input.customScalars ?? false + return { extensions: input.extensions ?? [], lint, @@ -159,9 +164,10 @@ export const createConfig = async (input: Input): Promise => { name: input.name ?? defaultName, schema, options: { + isImportsCustomScalars: isCustomScalarsModuleExists, defaultSchemaUrl, format: formattingEnabled, - customScalars: customScalarCodecsPathExists, + customScalars: isCustomScalarsModuleExists, TSDoc: { noDocPolicy: input.TSDoc?.noDocPolicy ?? `ignore`, }, @@ -180,7 +186,7 @@ export const createConfig = async (input: Input): Promise => { }, }, imports: { - customScalarCodecs: customScalarCodecsImportPath, + customScalarCodecs: customScalarsImportPath, grafflePackage: ConfigManager.mergeDefaults( defaultLibraryPaths, libraryPaths, diff --git a/src/generator/generator/__snapshots__/generate.test.ts.snap b/src/generator/generator/__snapshots__/generate.test.ts.snap index f47b8d54c..c6a226f6a 100644 --- a/src/generator/generator/__snapshots__/generate.test.ts.snap +++ b/src/generator/generator/__snapshots__/generate.test.ts.snap @@ -56,9 +56,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: { - Date: Scalar.Date - } defaultSchemaUrl: null } } @@ -72,9 +69,11 @@ exports[`kitchen-sink generated modules > modules/MethodsDocument.ts 1`] = ` import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -84,7 +83,7 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } " `; @@ -92,88 +91,92 @@ export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { exports[`kitchen-sink generated modules > modules/MethodsRoot.ts 1`] = ` "import { type Simplify } from 'type-fest' import type { InferResult } from '../../../../../../src/entrypoints/schema.js' -import type * as Utils from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface MutationMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation>) => Promise< +export interface MutationMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Mutation<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Mutation<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Mutation' }, '__typename' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > } -export interface QueryMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query>) => Promise< +export interface QueryMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Query<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Query<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Query' }, '__typename' > > > InputObjectNested: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.InputObjectNested>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ InputObjectNested: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ InputObjectNested: $SelectionSet }, Schema<$Context['scalars']>>, 'InputObjectNested' > > > InputObjectNestedNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.InputObjectNestedNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ InputObjectNestedNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ InputObjectNestedNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'InputObjectNestedNonNull' > > @@ -181,387 +184,434 @@ export interface QueryMethods<$Config extends Utils.Config> { /** * Query enum field documentation. */ - abcEnum: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.abcEnum>) => Promise< + abcEnum: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.abcEnum<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ abcEnum: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ abcEnum: $SelectionSet }, Schema<$Context['scalars']>>, 'abcEnum' > > > argInputObjectCircular: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.argInputObjectCircular>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ argInputObjectCircular: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ argInputObjectCircular: $SelectionSet }, Schema<$Context['scalars']>>, 'argInputObjectCircular' > > > - date: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.date>) => Promise< + date: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.date<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ date: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ date: $SelectionSet }, Schema<$Context['scalars']>>, 'date' > > > - dateArg: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArg>) => Promise< + dateArg: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArg<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArg: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArg' > > > dateArgInputObject: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgInputObject>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgInputObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgInputObject: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgInputObject' > > > - dateArgList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgList>) => Promise< + dateArgList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgList' > > > dateArgNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNull' > > > dateArgNonNullList: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullList>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNullList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNullList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNullList' > > > dateArgNonNullListNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullListNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNullListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNullListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNullListNonNull' > > > dateInterface1: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateInterface1>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateInterface1<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateInterface1: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateInterface1: $SelectionSet }, Schema<$Context['scalars']>>, 'dateInterface1' > > > - dateList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateList>) => Promise< + dateList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateList' > > > - dateListList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateListList>) => Promise< + dateListList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateListList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateListList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateListList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateListList' > > > dateListNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateListNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateListNonNull' > > > - dateNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateNonNull>) => Promise< + dateNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateNonNull' > > > - dateObject1: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateObject1>) => Promise< + dateObject1: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateObject1<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateObject1: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateObject1: $SelectionSet }, Schema<$Context['scalars']>>, 'dateObject1' > > > - dateUnion: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateUnion>) => Promise< + dateUnion: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateUnion<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateUnion: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateUnion: $SelectionSet }, Schema<$Context['scalars']>>, 'dateUnion' > > > - error: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.error>) => Promise< + error: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.error<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ error: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ error: $SelectionSet }, Schema<$Context['scalars']>>, 'error' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > - interface: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.$interface>) => Promise< + interface: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$interface<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interface: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interface: $SelectionSet }, Schema<$Context['scalars']>>, 'interface' > > > interfaceNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.interfaceNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interfaceNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interfaceNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'interfaceNonNull' > > > interfaceWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.interfaceWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interfaceWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interfaceWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'interfaceWithArgs' > > > - listInt: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listInt>) => Promise< + listInt: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listInt<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listInt: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listInt: $SelectionSet }, Schema<$Context['scalars']>>, 'listInt' > > > listIntNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listIntNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listIntNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listIntNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'listIntNonNull' > > > - listListInt: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listListInt>) => Promise< + listListInt: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listListInt<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listListInt: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listListInt: $SelectionSet }, Schema<$Context['scalars']>>, 'listListInt' > > > listListIntNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listListIntNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listListIntNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listListIntNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'listListIntNonNull' > > > lowerCaseUnion: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.lowerCaseUnion>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ lowerCaseUnion: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ lowerCaseUnion: $SelectionSet }, Schema<$Context['scalars']>>, 'lowerCaseUnion' > > > - object: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.$object>) => Promise< + object: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$object<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ object: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ object: $SelectionSet }, Schema<$Context['scalars']>>, 'object' > > > - objectList: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectList>) => Promise< + objectList: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectList: $SelectionSet }, Schema<$Context['scalars']>>, 'objectList' > > > objectListNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectListNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'objectListNonNull' > > > - objectNested: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectNested>) => Promise< + objectNested: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectNested<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectNested: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectNested: $SelectionSet }, Schema<$Context['scalars']>>, 'objectNested' > > > - objectNonNull: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectNonNull>) => Promise< + objectNonNull: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'objectNonNull' > > > objectWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'objectWithArgs' > > > - result: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.result>) => Promise< + result: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.result<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ result: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ result: $SelectionSet }, Schema<$Context['scalars']>>, 'result' > > > - resultNonNull: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.resultNonNull>) => Promise< + resultNonNull: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.resultNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ resultNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ resultNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'resultNonNull' > > > - string: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.$string>) => Promise< + string: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$string<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ string: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ string: $SelectionSet }, Schema<$Context['scalars']>>, 'string' > > > stringWithArgEnum: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgEnum>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgEnum: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgEnum: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgEnum' > > > stringWithArgInputObject: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObject>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObject<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgInputObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgInputObject: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgInputObject' > > > stringWithArgInputObjectRequired: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObjectRequired>, + selectionSet: $$Utilities.Exact< + $SelectionSet, + SelectionSet.Query.stringWithArgInputObjectRequired<$Context['scalars']> + >, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgInputObjectRequired: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgInputObjectRequired: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgInputObjectRequired' > > @@ -570,110 +620,114 @@ export interface QueryMethods<$Config extends Utils.Config> { * The given arguments are reflected back as a JSON string. */ stringWithArgs: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgs>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgs' > > > stringWithListArg: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithListArg>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithListArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithListArg: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithListArg' > > > stringWithListArgRequired: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithListArgRequired>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithListArgRequired<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithListArgRequired: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithListArgRequired: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithListArgRequired' > > > stringWithRequiredArg: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithRequiredArg>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithRequiredArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithRequiredArg: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithRequiredArg' > > > - unionFooBar: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBar>) => Promise< + unionFooBar: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBar<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBar: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBar: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBar' > > > unionFooBarNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBarNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBarNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBarNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBarNonNull' > > > unionFooBarWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBarWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBarWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBarWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBarWithArgs' > > > - unionObject: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionObject>) => Promise< + unionObject: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionObject<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionObject: $SelectionSet }, Schema<$Context['scalars']>>, 'unionObject' > > > unionObjectNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionObjectNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionObjectNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionObjectNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'unionObjectNonNull' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - mutation: MutationMethods<$Config> - query: QueryMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + mutation: MutationMethods<$Context> + query: QueryMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } " `; @@ -882,12 +936,10 @@ export interface Interface { `; exports[`kitchen-sink generated modules > modules/Scalar.ts 1`] = ` -"import type { SchemaKit } from '../../../../../../src/entrypoints/schema.js' +"import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' -import * as CustomScalars from '../../customScalarCodecs.js' +export * from '../../../../../../src/layers/1_Schema/Hybrid/types/Scalar/Scalar.js' -export * from '../../customScalarCodecs.js' -export { Date } from '../../customScalarCodecs.js' // // // @@ -900,14 +952,7 @@ export { Date } from '../../customScalarCodecs.js' // // -export type Date = typeof CustomScalars.Date -// Without this we get error: -// "Exported type alias 'DateDecoded' has or is using private name 'Date'." -type Date_ = typeof CustomScalars.Date -export type DateDecoded = SchemaKit.Scalar.GetDecoded -export type DateEncoded = SchemaKit.Scalar.GetEncoded - -export * from '../../../../../../src/layers/1_Schema/Hybrid/types/Scalar/Scalar.js' +export type Date = $$Utilities.SchemaKit.Scalar.ScalarCodecless<'Date'> " `; @@ -1220,18 +1265,6 @@ export namespace Schema { // // - // todo generate code like this: - export interface DateInterface2 extends $.Interface { - name: 'DateInterface1' - implementors: [DateObject1] - fields: { - date1: { - inlineType: [0] - namedType: $Scalar.Date - } - } - } - export type DateInterface1 = $.Interface<'DateInterface1', { date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> }, [DateObject1]> @@ -1295,6 +1328,7 @@ export namespace Schema { }> export type Object1 = $.Object$2<'Object1', { + ABCEnum: $.Field<'ABCEnum', $.Output.Nullable, null> boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> @@ -1372,11 +1406,13 @@ export namespace Schema { // // -import type * as Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Mutation', 'Query'] RootUnion: Schema.Mutation | Schema.Query @@ -1437,8 +1473,8 @@ export interface Schema extends Utilities.SchemaIndexBase { Error: Schema.Error Interface: Schema.Interface } - customScalars: Utilities.SchemaIndexBase['customScalars'] - extensions: Utilities.GlobalRegistry.TypeExtensions + scalars: $Scalars + extensions: $$Utilities.GlobalRegistry.TypeExtensions } " `; @@ -1488,7 +1524,7 @@ const String = $Scalar.String // // -const Date = $Scalar.Date +const Date = 'Date' // // @@ -1640,6 +1676,7 @@ const Foo: $Utilities.SchemaDrivenDataMap.OutputObject = { const Object1: $Utilities.SchemaDrivenDataMap.OutputObject = { f: { + ABCEnum: {}, boolean: {}, float: {}, id: {}, @@ -2333,7 +2370,7 @@ export namespace Select { exports[`kitchen-sink generated modules > modules/SelectionSets.ts 1`] = ` "import type { Select as $Select } from '../../../../../../src/entrypoints/schema.js' -import type * as $Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type * as $Scalar from './Scalar.js' // @@ -2353,9 +2390,9 @@ import type * as $Scalar from './Scalar.js' // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - query?: Record - mutation?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + query?: Record> + mutation?: Record> } // @@ -2388,15 +2425,15 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Mutation { +export interface Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the \`id\` field on the \`Mutation\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: Mutation.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Mutation.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`idNonNull\` field on the \`Mutation\` object. Its type is \`ID\` (a \`Scalar\`). */ - idNonNull?: Mutation.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Mutation.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -2406,7 +2443,9 @@ export interface Mutation { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Mutation$FragmentInline | Mutation$FragmentInline[] + ___?: + | Mutation$FragmentInline<$Scalars> + | Mutation$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -2418,28 +2457,54 @@ export interface Mutation { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Mutation$FragmentInline extends Mutation, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Mutation$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Mutation<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Mutation { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`idNonNull\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type idNonNull = $Select.Indicator.NoArgsIndicator + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + > } // @@ -2456,219 +2521,261 @@ export namespace Mutation { // ----------------------------------------| Entrypoint Interface | -export interface Query { +export interface Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the \`InputObjectNested\` field on the \`Query\` object. Its type is \`ID\` (a \`Scalar\`). */ - InputObjectNested?: Query.InputObjectNested$Expanded | $Select.SelectAlias.SelectAlias + InputObjectNested?: + | Query.InputObjectNested$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`InputObjectNestedNonNull\` field on the \`Query\` object. Its type is \`ID\` (a \`Scalar\`). */ InputObjectNestedNonNull?: - | Query.InputObjectNestedNonNull - | $Select.SelectAlias.SelectAlias + | Query.InputObjectNestedNonNull<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`abcEnum\` field on the \`Query\` object. Its type is Enum. */ - abcEnum?: Query.abcEnum$Expanded | $Select.SelectAlias.SelectAlias + abcEnum?: Query.abcEnum$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`argInputObjectCircular\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ argInputObjectCircular?: - | Query.argInputObjectCircular$Expanded - | $Select.SelectAlias.SelectAlias + | Query.argInputObjectCircular$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`date\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - date?: Query.date$Expanded | $Select.SelectAlias.SelectAlias + date?: Query.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateArg\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateArg?: Query.dateArg$Expanded | $Select.SelectAlias.SelectAlias + dateArg?: Query.dateArg$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateArgInputObject\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateArgInputObject?: Query.dateArgInputObject$Expanded | $Select.SelectAlias.SelectAlias + dateArgInputObject?: + | Query.dateArgInputObject$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`dateArgList\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateArgList?: Query.dateArgList$Expanded | $Select.SelectAlias.SelectAlias + dateArgList?: Query.dateArgList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateArgNonNull\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateArgNonNull?: Query.dateArgNonNull | $Select.SelectAlias.SelectAlias + dateArgNonNull?: Query.dateArgNonNull<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateArgNonNullList\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateArgNonNullList?: Query.dateArgNonNullList | $Select.SelectAlias.SelectAlias + dateArgNonNullList?: + | Query.dateArgNonNullList<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`dateArgNonNullListNonNull\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ dateArgNonNullListNonNull?: - | Query.dateArgNonNullListNonNull - | $Select.SelectAlias.SelectAlias + | Query.dateArgNonNullListNonNull<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`dateInterface1\` field on the \`Query\` object. Its type is Interface. */ - dateInterface1?: Query.dateInterface1$Expanded | $Select.SelectAlias.SelectAlias + dateInterface1?: + | Query.dateInterface1$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`dateList\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateList?: Query.dateList$Expanded | $Select.SelectAlias.SelectAlias + dateList?: Query.dateList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateListList\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateListList?: Query.dateListList$Expanded | $Select.SelectAlias.SelectAlias + dateListList?: Query.dateListList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateListNonNull\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateListNonNull?: Query.dateListNonNull$Expanded | $Select.SelectAlias.SelectAlias + dateListNonNull?: + | Query.dateListNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`dateNonNull\` field on the \`Query\` object. Its type is \`Date\` (a \`Scalar\`). */ - dateNonNull?: Query.dateNonNull$Expanded | $Select.SelectAlias.SelectAlias + dateNonNull?: Query.dateNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateObject1\` field on the \`Query\` object. Its type is Object. */ - dateObject1?: Query.dateObject1$Expanded | $Select.SelectAlias.SelectAlias + dateObject1?: Query.dateObject1$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`dateUnion\` field on the \`Query\` object. Its type is Union. */ - dateUnion?: Query.dateUnion$Expanded | $Select.SelectAlias.SelectAlias + dateUnion?: Query.dateUnion$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`error\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ - error?: Query.error$Expanded | $Select.SelectAlias.SelectAlias + error?: Query.error$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`id\` field on the \`Query\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: Query.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Query.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`idNonNull\` field on the \`Query\` object. Its type is \`ID\` (a \`Scalar\`). */ - idNonNull?: Query.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Query.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`interface\` field on the \`Query\` object. Its type is Interface. */ - interface?: Query.$interface$Expanded | $Select.SelectAlias.SelectAlias + interface?: Query.$interface$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`interfaceNonNull\` field on the \`Query\` object. Its type is Interface. */ - interfaceNonNull?: Query.interfaceNonNull$Expanded | $Select.SelectAlias.SelectAlias + interfaceNonNull?: + | Query.interfaceNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`interfaceWithArgs\` field on the \`Query\` object. Its type is Interface. */ - interfaceWithArgs?: Query.interfaceWithArgs | $Select.SelectAlias.SelectAlias + interfaceWithArgs?: + | Query.interfaceWithArgs<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`listInt\` field on the \`Query\` object. Its type is \`Int\` (a \`Scalar\`). */ - listInt?: Query.listInt$Expanded | $Select.SelectAlias.SelectAlias + listInt?: Query.listInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`listIntNonNull\` field on the \`Query\` object. Its type is \`Int\` (a \`Scalar\`). */ - listIntNonNull?: Query.listIntNonNull$Expanded | $Select.SelectAlias.SelectAlias + listIntNonNull?: + | Query.listIntNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`listListInt\` field on the \`Query\` object. Its type is \`Int\` (a \`Scalar\`). */ - listListInt?: Query.listListInt$Expanded | $Select.SelectAlias.SelectAlias + listListInt?: Query.listListInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`listListIntNonNull\` field on the \`Query\` object. Its type is \`Int\` (a \`Scalar\`). */ - listListIntNonNull?: Query.listListIntNonNull$Expanded | $Select.SelectAlias.SelectAlias + listListIntNonNull?: + | Query.listListIntNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`lowerCaseUnion\` field on the \`Query\` object. Its type is Union. */ - lowerCaseUnion?: Query.lowerCaseUnion$Expanded | $Select.SelectAlias.SelectAlias + lowerCaseUnion?: + | Query.lowerCaseUnion$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`object\` field on the \`Query\` object. Its type is Object. */ - object?: Query.$object$Expanded | $Select.SelectAlias.SelectAlias + object?: Query.$object$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`objectList\` field on the \`Query\` object. Its type is Object. */ - objectList?: Query.objectList$Expanded | $Select.SelectAlias.SelectAlias + objectList?: Query.objectList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`objectListNonNull\` field on the \`Query\` object. Its type is Object. */ - objectListNonNull?: Query.objectListNonNull$Expanded | $Select.SelectAlias.SelectAlias + objectListNonNull?: + | Query.objectListNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`objectNested\` field on the \`Query\` object. Its type is Object. */ - objectNested?: Query.objectNested$Expanded | $Select.SelectAlias.SelectAlias + objectNested?: Query.objectNested$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`objectNonNull\` field on the \`Query\` object. Its type is Object. */ - objectNonNull?: Query.objectNonNull$Expanded | $Select.SelectAlias.SelectAlias + objectNonNull?: + | Query.objectNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`objectWithArgs\` field on the \`Query\` object. Its type is Object. */ - objectWithArgs?: Query.objectWithArgs$Expanded | $Select.SelectAlias.SelectAlias + objectWithArgs?: + | Query.objectWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`result\` field on the \`Query\` object. Its type is Union. */ - result?: Query.result | $Select.SelectAlias.SelectAlias + result?: Query.result<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`resultNonNull\` field on the \`Query\` object. Its type is Union. */ - resultNonNull?: Query.resultNonNull$Expanded | $Select.SelectAlias.SelectAlias + resultNonNull?: + | Query.resultNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`string\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ - string?: Query.$string$Expanded | $Select.SelectAlias.SelectAlias + string?: Query.$string$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`stringWithArgEnum\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ - stringWithArgEnum?: Query.stringWithArgEnum$Expanded | $Select.SelectAlias.SelectAlias + stringWithArgEnum?: + | Query.stringWithArgEnum$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`stringWithArgInputObject\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ stringWithArgInputObject?: - | Query.stringWithArgInputObject$Expanded - | $Select.SelectAlias.SelectAlias + | Query.stringWithArgInputObject$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`stringWithArgInputObjectRequired\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ stringWithArgInputObjectRequired?: - | Query.stringWithArgInputObjectRequired - | $Select.SelectAlias.SelectAlias + | Query.stringWithArgInputObjectRequired<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`stringWithArgs\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ - stringWithArgs?: Query.stringWithArgs$Expanded | $Select.SelectAlias.SelectAlias + stringWithArgs?: + | Query.stringWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`stringWithListArg\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ - stringWithListArg?: Query.stringWithListArg$Expanded | $Select.SelectAlias.SelectAlias + stringWithListArg?: + | Query.stringWithListArg$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`stringWithListArgRequired\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ stringWithListArgRequired?: - | Query.stringWithListArgRequired - | $Select.SelectAlias.SelectAlias + | Query.stringWithListArgRequired<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`stringWithRequiredArg\` field on the \`Query\` object. Its type is \`String\` (a \`Scalar\`). */ - stringWithRequiredArg?: Query.stringWithRequiredArg | $Select.SelectAlias.SelectAlias + stringWithRequiredArg?: + | Query.stringWithRequiredArg<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`unionFooBar\` field on the \`Query\` object. Its type is Union. */ - unionFooBar?: Query.unionFooBar$Expanded | $Select.SelectAlias.SelectAlias + unionFooBar?: Query.unionFooBar$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`unionFooBarNonNull\` field on the \`Query\` object. Its type is Union. */ - unionFooBarNonNull?: Query.unionFooBarNonNull$Expanded | $Select.SelectAlias.SelectAlias + unionFooBarNonNull?: + | Query.unionFooBarNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`unionFooBarWithArgs\` field on the \`Query\` object. Its type is Union. */ - unionFooBarWithArgs?: Query.unionFooBarWithArgs$Expanded | $Select.SelectAlias.SelectAlias + unionFooBarWithArgs?: + | Query.unionFooBarWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`unionObject\` field on the \`Query\` object. Its type is Object. */ - unionObject?: Query.unionObject$Expanded | $Select.SelectAlias.SelectAlias + unionObject?: Query.unionObject$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`unionObjectNonNull\` field on the \`Query\` object. Its type is Object. */ - unionObjectNonNull?: Query.unionObjectNonNull$Expanded | $Select.SelectAlias.SelectAlias + unionObjectNonNull?: + | Query.unionObjectNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -2678,7 +2785,9 @@ export interface Query { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Query$FragmentInline | Query$FragmentInline[] + ___?: + | Query$FragmentInline<$Scalars> + | Query$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -2690,527 +2799,1327 @@ export interface Query { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Query$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Query<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Query { - export type InputObjectNested$SelectionSetArguments = { - input?: _RefDefs._InputObjectNested | undefined | null + export type InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | InputObjectNested$SelectionSet<$Scalars> + + export interface InputObjectNested$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`InputObjectNested\` field. No arguments are required so you may omit this. + */ + $?: InputObjectNested$Arguments<$Scalars> + } + + export interface InputObjectNested$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObjectNested<$Scalars> | undefined | null } - export type InputObjectNested$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`InputObjectNested\` field. - * No arguments are required so you may omit this. - */ - $?: InputObjectNested$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the \`InputObjectNested\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type InputObjectNested$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | InputObjectNested$SelectionSet - > + export type InputObjectNested$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | InputObjectNested$SelectionSet<$Scalars> + > - export type InputObjectNested = $Select.Indicator.Indicator | InputObjectNested$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type InputObjectNestedNonNull$SelectionSetArguments = { - input: _RefDefs._InputObjectNestedNonNull - } - export interface InputObjectNestedNonNull extends $Select.Bases.Base { + export type InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + InputObjectNestedNonNull$SelectionSet<$Scalars> + + export interface InputObjectNestedNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for \`InputObjectNestedNonNull\` field. - * All arguments are required so you must include this. + * Arguments for \`InputObjectNestedNonNull\` field. All arguments are required so you must include this. */ - $: InputObjectNestedNonNull$SelectionSetArguments + $: InputObjectNestedNonNull$Arguments<$Scalars> + } + + export interface InputObjectNestedNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input: $NamedTypes.$InputObjectNestedNonNull<$Scalars> } + // --- expanded --- + + /** + * This is the "expanded" version of the \`InputObjectNestedNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type InputObjectNestedNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + InputObjectNestedNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type abcEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | abcEnum$SelectionSet<$Scalars> + + export interface abcEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`abcEnum\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type abcEnum$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type abcEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | abcEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type abcEnum = $Select.Indicator.NoArgsIndicator + export type argInputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | argInputObjectCircular$SelectionSet<$Scalars> - export type argInputObjectCircular$SelectionSetArguments = { - input?: _RefDefs._InputObjectCircular | undefined | null + export interface argInputObjectCircular$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`argInputObjectCircular\` field. No arguments are required so you may omit this. + */ + $?: argInputObjectCircular$Arguments<$Scalars> } - export type argInputObjectCircular$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`argInputObjectCircular\` field. - * No arguments are required so you may omit this. - */ - $?: argInputObjectCircular$SelectionSetArguments - } - > + + export interface argInputObjectCircular$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObjectCircular<$Scalars> | undefined | null + } + + // --- expanded --- /** * This is the "expanded" version of the \`argInputObjectCircular\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type argInputObjectCircular$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | argInputObjectCircular$SelectionSet - > + export type argInputObjectCircular$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | argInputObjectCircular$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type argInputObjectCircular = $Select.Indicator.Indicator | argInputObjectCircular$SelectionSet + // --- expanded --- /** * This is the "expanded" version of the \`date\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type date = $Select.Indicator.NoArgsIndicator + export type dateArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArg$SelectionSet<$Scalars> - export type dateArg$SelectionSetArguments = { - date?: $Scalar.DateDecoded | undefined | null + export interface dateArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`dateArg\` field. No arguments are required so you may omit this. + */ + $?: dateArg$Arguments<$Scalars> } - export type dateArg$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`dateArg\` field. - * No arguments are required so you may omit this. - */ - $?: dateArg$SelectionSetArguments - } - > + + export interface dateArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + } + + // --- expanded --- /** * This is the "expanded" version of the \`dateArg\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArg$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | dateArg$SelectionSet> + export type dateArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArg$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type dateArg = $Select.Indicator.Indicator | dateArg$SelectionSet + export type dateArgInputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArgInputObject$SelectionSet<$Scalars> - export type dateArgInputObject$SelectionSetArguments = { - input?: _RefDefs._InputObject | undefined | null + export interface dateArgInputObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`dateArgInputObject\` field. No arguments are required so you may omit this. + */ + $?: dateArgInputObject$Arguments<$Scalars> } - export type dateArgInputObject$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`dateArgInputObject\` field. - * No arguments are required so you may omit this. - */ - $?: dateArgInputObject$SelectionSetArguments - } - > + + export interface dateArgInputObject$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObject<$Scalars> | undefined | null + } + + // --- expanded --- /** * This is the "expanded" version of the \`dateArgInputObject\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArgInputObject$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | dateArgInputObject$SelectionSet - > + export type dateArgInputObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArgInputObject$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type dateArgInputObject = $Select.Indicator.Indicator | dateArgInputObject$SelectionSet + export type dateArgList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArgList$SelectionSet<$Scalars> + + export interface dateArgList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`dateArgList\` field. No arguments are required so you may omit this. + */ + $?: dateArgList$Arguments<$Scalars> + } - export type dateArgList$SelectionSetArguments = { - date?: Array<$Scalar.DateDecoded | undefined | null> | undefined | null + export interface dateArgList$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > + | undefined + | null } - export type dateArgList$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`dateArgList\` field. - * No arguments are required so you may omit this. - */ - $?: dateArgList$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the \`dateArgList\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArgList$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | dateArgList$SelectionSet> + export type dateArgList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArgList$SelectionSet<$Scalars> + > - export type dateArgList = $Select.Indicator.Indicator | dateArgList$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type dateArgNonNull$SelectionSetArguments = { - date: $Scalar.DateDecoded - } - export interface dateArgNonNull extends $Select.Bases.Base { - /** - * Arguments for \`dateArgNonNull\` field. - * All arguments are required so you must include this. - */ - $: dateArgNonNull$SelectionSetArguments - } + export type dateArgNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNull$SelectionSet<$Scalars> - export type dateArgNonNullList$SelectionSetArguments = { - date: Array<$Scalar.DateDecoded | undefined | null> - } - export interface dateArgNonNullList extends $Select.Bases.Base { + export interface dateArgNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for \`dateArgNonNullList\` field. - * All arguments are required so you must include this. + * Arguments for \`dateArgNonNull\` field. All arguments are required so you must include this. */ - $: dateArgNonNullList$SelectionSetArguments + $: dateArgNonNull$Arguments<$Scalars> } - export type dateArgNonNullListNonNull$SelectionSetArguments = { - date: Array<$Scalar.DateDecoded | undefined | null> - } - export interface dateArgNonNullListNonNull extends $Select.Bases.Base { - /** - * Arguments for \`dateArgNonNullListNonNull\` field. - * All arguments are required so you must include this. - */ - $: dateArgNonNullListNonNull$SelectionSetArguments + export interface dateArgNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > } - export interface dateInterface1 extends _RefDefs._DateInterface1 {} - export type dateInterface1$Expanded = dateInterface1 + // --- expanded --- + /** - * This is the "expanded" version of the \`dateList\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateArgNonNull\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateList$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateArgNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNull$SelectionSet<$Scalars> + > - export type dateList = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - /** - * This is the "expanded" version of the \`dateListList\` type. It is identical except for the fact - * that IDEs will display its contents (a union type) directly, rather than the name of this type. - * In some cases, this is a preferable DX, making the types easier to read for users. - */ - export type dateListList$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateArgNonNullList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNullList$SelectionSet<$Scalars> + + export interface dateArgNonNullList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`dateArgNonNullList\` field. All arguments are required so you must include this. + */ + $: dateArgNonNullList$Arguments<$Scalars> + } + + export interface dateArgNonNullList$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > + } - export type dateListList = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the \`dateListNonNull\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateArgNonNullList\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateListNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateArgNonNullList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNullList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateArgNonNullListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNullListNonNull$SelectionSet<$Scalars> + + export interface dateArgNonNullListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`dateArgNonNullListNonNull\` field. All arguments are required so you must include this. + */ + $: dateArgNonNullListNonNull$Arguments<$Scalars> + } - export type dateListNonNull = $Select.Indicator.NoArgsIndicator + export interface dateArgNonNullListNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > + } + + // --- expanded --- /** - * This is the "expanded" version of the \`dateNonNull\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateArgNonNullListNonNull\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateArgNonNullListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNullListNonNull$SelectionSet<$Scalars> + > - export type dateNonNull = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export interface dateObject1 extends _RefDefs._DateObject1 {} - export type dateObject1$Expanded = dateObject1 - export interface dateUnion extends _RefDefs._DateUnion {} - export type dateUnion$Expanded = dateUnion - export type error$SelectionSetArguments = { - case?: string | undefined | null - } - export type error$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`error\` field. - * No arguments are required so you may omit this. - */ - $?: error$SelectionSetArguments - } - > + export type dateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateInterface1$SelectionSet<$Scalars> + + export interface dateInterface1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateInterface1<$Scalars> + {} + + // --- expanded --- /** - * This is the "expanded" version of the \`error\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateInterface1\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type error$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | error$SelectionSet> + export type dateInterface1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateInterface1$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateList$SelectionSet<$Scalars> - export type error = $Select.Indicator.Indicator | error$SelectionSet + export interface dateList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** - * This is the "expanded" version of the \`id\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateList\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateList$SelectionSet<$Scalars> + > - export type id = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type dateListList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateListList$SelectionSet<$Scalars> + + export interface dateListList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** - * This is the "expanded" version of the \`idNonNull\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateListList\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateListList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateListList$SelectionSet<$Scalars> + > - export type idNonNull = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type dateListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateListNonNull$SelectionSet<$Scalars> + + export interface dateListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- - export interface $interface extends _RefDefs._Interface {} - export type $interface$Expanded = $interface - export interface interfaceNonNull extends _RefDefs._Interface {} - export type interfaceNonNull$Expanded = interfaceNonNull - export interface interfaceWithArgs extends _RefDefs._Interface { - /** - * Arguments for \`interfaceWithArgs\` field. - * All arguments are required so you must include this. - */ - $: { - id: string - } - } - export type interfaceWithArgs$Expanded = interfaceWithArgs /** - * This is the "expanded" version of the \`listInt\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateListNonNull\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateListNonNull$SelectionSet<$Scalars> + > - export type listInt = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type dateNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateNonNull$SelectionSet<$Scalars> + + export interface dateNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** - * This is the "expanded" version of the \`listIntNonNull\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateNonNull\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listIntNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = dateObject1$SelectionSet< + $Scalars + > + + export interface dateObject1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateObject1<$Scalars> + {} - export type listIntNonNull = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the \`listListInt\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateObject1\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listListInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateObject1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + dateObject1$SelectionSet<$Scalars> + > - export type listListInt = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type dateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = dateUnion$SelectionSet<$Scalars> + + export interface dateUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateUnion<$Scalars> + {} + + // --- expanded --- /** - * This is the "expanded" version of the \`listListIntNonNull\` type. It is identical except for the fact + * This is the "expanded" version of the \`dateUnion\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listListIntNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type listListIntNonNull = $Select.Indicator.NoArgsIndicator - - export interface lowerCaseUnion extends _RefDefs._lowerCaseUnion {} - export type lowerCaseUnion$Expanded = lowerCaseUnion - export interface $object extends _RefDefs._Object1 {} - export type $object$Expanded = $object - export interface objectList extends _RefDefs._Object1 {} - export type objectList$Expanded = objectList - export interface objectListNonNull extends _RefDefs._Object1 {} - export type objectListNonNull$Expanded = objectListNonNull - export interface objectNested extends _RefDefs._ObjectNested {} - export type objectNested$Expanded = objectNested - export interface objectNonNull extends _RefDefs._Object1 {} - export type objectNonNull$Expanded = objectNonNull - export interface objectWithArgs extends _RefDefs._Object1 { - /** - * Arguments for \`objectWithArgs\` field. - * No arguments are required so you may omit this. - */ - $?: { - boolean?: boolean | undefined | null - float?: number | undefined | null - id?: string | undefined | null - int?: number | undefined | null - string?: string | undefined | null - } - } - export type objectWithArgs$Expanded = objectWithArgs - export interface result extends _RefDefs._Result { + export type dateUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + dateUnion$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | error$SelectionSet<$Scalars> + + export interface error$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for \`result\` field. - * All arguments are required so you must include this. + * Arguments for \`error\` field. No arguments are required so you may omit this. */ - $: { - $case: _RefDefs._Case - } + $?: error$Arguments<$Scalars> } - export type result$Expanded = result - export interface resultNonNull extends _RefDefs._Result { - /** - * Arguments for \`resultNonNull\` field. - * No arguments are required so you may omit this. - */ - $?: { - $case?: _RefDefs._Case | undefined | null - } + + export interface error$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + case?: string | undefined | null } - export type resultNonNull$Expanded = resultNonNull + + // --- expanded --- + /** - * This is the "expanded" version of the \`$string\` type. It is identical except for the fact + * This is the "expanded" version of the \`error\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $string$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type error$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | error$SelectionSet<$Scalars> + > - export type $string = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export type stringWithArgEnum$SelectionSetArguments = { - $ABCEnum?: _RefDefs._ABCEnum | undefined | null - } - export type stringWithArgEnum$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`stringWithArgEnum\` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgEnum$SelectionSetArguments - } - > + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** - * This is the "expanded" version of the \`stringWithArgEnum\` type. It is identical except for the fact + * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgEnum$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgEnum$SelectionSet + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> > - export type stringWithArgEnum = $Select.Indicator.Indicator | stringWithArgEnum$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithArgInputObject$SelectionSetArguments = { - input?: _RefDefs._InputObject | undefined | null - } - export type stringWithArgInputObject$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`stringWithArgInputObject\` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgInputObject$SelectionSetArguments - } - > + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** - * This is the "expanded" version of the \`stringWithArgInputObject\` type. It is identical except for the fact + * This is the "expanded" version of the \`idNonNull\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgInputObject$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgInputObject$SelectionSet + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> > - export type stringWithArgInputObject = $Select.Indicator.Indicator | stringWithArgInputObject$SelectionSet - - export type stringWithArgInputObjectRequired$SelectionSetArguments = { - input: _RefDefs._InputObject - } - export interface stringWithArgInputObjectRequired extends $Select.Bases.Base { - /** - * Arguments for \`stringWithArgInputObjectRequired\` field. - * All arguments are required so you must include this. - */ - $: stringWithArgInputObjectRequired$SelectionSetArguments - } + // -------------------------------------------------------------------------------------------------- - export type stringWithArgs$SelectionSetArguments = { - boolean?: boolean | undefined | null - float?: number | undefined | null - id?: string | undefined | null - int?: number | undefined | null - string?: string | undefined | null - } - export type stringWithArgs$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`stringWithArgs\` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgs$SelectionSetArguments - } + export type $interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $interface$SelectionSet< + $Scalars > + export interface $interface$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + {} + + // --- expanded --- + /** - * This is the "expanded" version of the \`stringWithArgs\` type. It is identical except for the fact + * This is the "expanded" version of the \`$interface\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgs$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgs$SelectionSet + export type $interface$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $interface$SelectionSet<$Scalars> > - export type stringWithArgs = $Select.Indicator.Indicator | stringWithArgs$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithListArg$SelectionSetArguments = { - ints?: Array | undefined | null - } - export type stringWithListArg$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for \`stringWithListArg\` field. - * No arguments are required so you may omit this. - */ - $?: stringWithListArg$SelectionSetArguments - } - > + export type interfaceNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + interfaceNonNull$SelectionSet<$Scalars> + + export interface interfaceNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`interfaceNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type interfaceNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + interfaceNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type interfaceWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + interfaceWithArgs$SelectionSet<$Scalars> + + export interface interfaceWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + { + /** + * Arguments for \`interfaceWithArgs\` field. All arguments are required so you must include this. + */ + $: interfaceWithArgs$Arguments<$Scalars> + } + + export interface interfaceWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + id: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`interfaceWithArgs\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type interfaceWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + interfaceWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listInt$SelectionSet<$Scalars> + + export interface listInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`listInt\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listInt$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listIntNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listIntNonNull$SelectionSet<$Scalars> + + export interface listIntNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`listIntNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listIntNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listIntNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listListInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listListInt$SelectionSet<$Scalars> + + export interface listListInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`listListInt\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listListInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listListInt$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listListIntNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listListIntNonNull$SelectionSet<$Scalars> + + export interface listListIntNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`listListIntNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listListIntNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listListIntNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + lowerCaseUnion$SelectionSet<$Scalars> + + export interface lowerCaseUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$lowerCaseUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`lowerCaseUnion\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type lowerCaseUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + lowerCaseUnion$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $object<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $object$SelectionSet<$Scalars> + + export interface $object$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`$object\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $object$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $object$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectList$SelectionSet< + $Scalars + > + + export interface objectList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`objectList\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + objectList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + objectListNonNull$SelectionSet<$Scalars> + + export interface objectListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`objectListNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectListNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectNested$SelectionSet< + $Scalars + > + + export interface objectNested$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectNested<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`objectNested\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectNested$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectNested$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectNonNull$SelectionSet< + $Scalars + > + + export interface objectNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`objectNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + objectWithArgs$SelectionSet<$Scalars> + + export interface objectWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + { + /** + * Arguments for \`objectWithArgs\` field. No arguments are required so you may omit this. + */ + $?: objectWithArgs$Arguments<$Scalars> + } + + export interface objectWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + boolean?: boolean | undefined | null + float?: number | undefined | null + id?: string | undefined | null + int?: number | undefined | null + string?: string | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`objectWithArgs\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = result$SelectionSet<$Scalars> + + export interface result$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Result<$Scalars> + { + /** + * Arguments for \`result\` field. All arguments are required so you must include this. + */ + $: result$Arguments<$Scalars> + } + + export interface result$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $case: $NamedTypes.$Case + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`result\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type result$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + result$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type resultNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = resultNonNull$SelectionSet< + $Scalars + > + + export interface resultNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Result<$Scalars> + { + /** + * Arguments for \`resultNonNull\` field. No arguments are required so you may omit this. + */ + $?: resultNonNull$Arguments<$Scalars> + } + + export interface resultNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $case?: $NamedTypes.$Case | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`resultNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type resultNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + resultNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $string<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + + export interface $string$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`$string\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $string$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgEnum$SelectionSet<$Scalars> + + export interface stringWithArgEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`stringWithArgEnum\` field. No arguments are required so you may omit this. + */ + $?: stringWithArgEnum$Arguments<$Scalars> + } + + export interface stringWithArgEnum$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $ABCEnum?: $NamedTypes.$ABCEnum | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`stringWithArgEnum\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithArgEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgInputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgInputObject$SelectionSet<$Scalars> + + export interface stringWithArgInputObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`stringWithArgInputObject\` field. No arguments are required so you may omit this. + */ + $?: stringWithArgInputObject$Arguments<$Scalars> + } + + export interface stringWithArgInputObject$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObject<$Scalars> | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`stringWithArgInputObject\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithArgInputObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgInputObject$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgInputObjectRequired<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithArgInputObjectRequired$SelectionSet<$Scalars> + + export interface stringWithArgInputObjectRequired$SelectionSet< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, + > extends $Select.Bases.Base { + /** + * Arguments for \`stringWithArgInputObjectRequired\` field. All arguments are required so you must include this. + */ + $: stringWithArgInputObjectRequired$Arguments<$Scalars> + } + + export interface stringWithArgInputObjectRequired$Arguments< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, + > { + input: $NamedTypes.$InputObject<$Scalars> + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`stringWithArgInputObjectRequired\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithArgInputObjectRequired$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithArgInputObjectRequired$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgs$SelectionSet<$Scalars> + + export interface stringWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`stringWithArgs\` field. No arguments are required so you may omit this. + */ + $?: stringWithArgs$Arguments<$Scalars> + } + + export interface stringWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + boolean?: boolean | undefined | null + float?: number | undefined | null + id?: string | undefined | null + int?: number | undefined | null + string?: string | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the \`stringWithArgs\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithListArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithListArg$SelectionSet<$Scalars> + + export interface stringWithListArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`stringWithListArg\` field. No arguments are required so you may omit this. + */ + $?: stringWithListArg$Arguments<$Scalars> + } + + export interface stringWithListArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ints?: Array | undefined | null + } + + // --- expanded --- /** * This is the "expanded" version of the \`stringWithListArg\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithListArg$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithListArg$SelectionSet - > + export type stringWithListArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithListArg$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithListArgRequired<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithListArgRequired$SelectionSet<$Scalars> - export type stringWithListArg = $Select.Indicator.Indicator | stringWithListArg$SelectionSet + export interface stringWithListArgRequired$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for \`stringWithListArgRequired\` field. All arguments are required so you must include this. + */ + $: stringWithListArgRequired$Arguments<$Scalars> + } - export type stringWithListArgRequired$SelectionSetArguments = { + export interface stringWithListArgRequired$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { ints: Array } - export interface stringWithListArgRequired extends $Select.Bases.Base { + + // --- expanded --- + + /** + * This is the "expanded" version of the \`stringWithListArgRequired\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithListArgRequired$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithListArgRequired$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithRequiredArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithRequiredArg$SelectionSet<$Scalars> + + export interface stringWithRequiredArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for \`stringWithListArgRequired\` field. - * All arguments are required so you must include this. + * Arguments for \`stringWithRequiredArg\` field. All arguments are required so you must include this. */ - $: stringWithListArgRequired$SelectionSetArguments + $: stringWithRequiredArg$Arguments<$Scalars> } - export type stringWithRequiredArg$SelectionSetArguments = { + export interface stringWithRequiredArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { string: string } - export interface stringWithRequiredArg extends $Select.Bases.Base { + + // --- expanded --- + + /** + * This is the "expanded" version of the \`stringWithRequiredArg\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithRequiredArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithRequiredArg$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type unionFooBar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = unionFooBar$SelectionSet< + $Scalars + > + + export interface unionFooBar$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`unionFooBar\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type unionFooBar$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + unionFooBar$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type unionFooBarNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionFooBarNonNull$SelectionSet<$Scalars> + + export interface unionFooBarNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`unionFooBarNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type unionFooBarNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionFooBarNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type unionFooBarWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionFooBarWithArgs$SelectionSet<$Scalars> + + export interface unionFooBarWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + { /** - * Arguments for \`stringWithRequiredArg\` field. - * All arguments are required so you must include this. + * Arguments for \`unionFooBarWithArgs\` field. No arguments are required so you may omit this. */ - $: stringWithRequiredArg$SelectionSetArguments + $?: unionFooBarWithArgs$Arguments<$Scalars> } - export interface unionFooBar extends _RefDefs._FooBarUnion {} - export type unionFooBar$Expanded = unionFooBar - export interface unionFooBarNonNull extends _RefDefs._FooBarUnion {} - export type unionFooBarNonNull$Expanded = unionFooBarNonNull - export interface unionFooBarWithArgs extends _RefDefs._FooBarUnion { - /** - * Arguments for \`unionFooBarWithArgs\` field. - * No arguments are required so you may omit this. - */ - $?: { - id?: string | undefined | null - } + export interface unionFooBarWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + id?: string | undefined | null } - export type unionFooBarWithArgs$Expanded = unionFooBarWithArgs - export interface unionObject extends _RefDefs._ObjectUnion {} - export type unionObject$Expanded = unionObject - export interface unionObjectNonNull extends _RefDefs._ObjectUnion {} - export type unionObjectNonNull$Expanded = unionObjectNonNull + + // --- expanded --- + + /** + * This is the "expanded" version of the \`unionFooBarWithArgs\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type unionFooBarWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionFooBarWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type unionObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = unionObject$SelectionSet< + $Scalars + > + + export interface unionObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`unionObject\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type unionObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + unionObject$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type unionObjectNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionObjectNonNull$SelectionSet<$Scalars> + + export interface unionObjectNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`unionObjectNonNull\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type unionObjectNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionObjectNonNull$SelectionSet<$Scalars> + > } // @@ -3257,24 +4166,36 @@ export type Case = 'ErrorOne' | 'ErrorTwo' | 'Object1' // // -export interface InputObject { - date?: $Scalar.DateDecoded | undefined | null - dateRequired: $Scalar.DateDecoded +export interface InputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + dateRequired: $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > id?: string | undefined | null idRequired: string } -export interface InputObjectCircular { - circular?: _RefDefs._InputObjectCircular | undefined | null - date?: $Scalar.DateDecoded | undefined | null +export interface InputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + circular?: $NamedTypes.$InputObjectCircular<$Scalars> | undefined | null + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null } -export interface InputObjectNested { - InputObject?: _RefDefs._InputObject | undefined | null +export interface InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + InputObject?: $NamedTypes.$InputObject<$Scalars> | undefined | null } -export interface InputObjectNestedNonNull { - InputObject: _RefDefs._InputObject +export interface InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + InputObject: $NamedTypes.$InputObject<$Scalars> } // @@ -3293,13 +4214,14 @@ export interface InputObjectNestedNonNull { // // -// -------------- -// Interface Type DateInterface1 -// -------------- +// Interface Type: DateInterface1 +// -------------------------------------------------------------------------------------------------- -export interface DateInterface1 extends $Select.Bases.ObjectLike { - date1?: DateInterface1.date1 - ___on_DateObject1?: DateObject1 +export interface DateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + date1?: DateInterface1.date1<$Scalars> + ___on_DateObject1?: DateObject1<$Scalars> /** * Inline fragments for field groups. @@ -3309,7 +4231,9 @@ export interface DateInterface1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateInterface1$FragmentInline | DateInterface1$FragmentInline[] + ___?: + | DateInterface1$FragmentInline<$Scalars> + | DateInterface1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -3322,29 +4246,39 @@ export interface DateInterface1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateInterface1$FragmentInline - extends DateInterface1, $Select.Directive.$Groups.InlineFragment.Fields +export interface DateInterface1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateInterface1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} export namespace DateInterface1 { + export type date1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + + export interface date1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`date1\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date1$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date1 = $Select.Indicator.NoArgsIndicator + export type date1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + > } -// -------------- -// Interface Type Error -// -------------- +// Interface Type: Error +// -------------------------------------------------------------------------------------------------- -export interface Error extends $Select.Bases.ObjectLike { - message?: Error.message - ___on_ErrorOne?: ErrorOne - ___on_ErrorTwo?: ErrorTwo +export interface Error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { + message?: Error.message<$Scalars> + ___on_ErrorOne?: ErrorOne<$Scalars> + ___on_ErrorTwo?: ErrorTwo<$Scalars> /** * Inline fragments for field groups. @@ -3354,7 +4288,9 @@ export interface Error extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Error$FragmentInline | Error$FragmentInline[] + ___?: + | Error$FragmentInline<$Scalars> + | Error$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -3367,27 +4303,41 @@ export interface Error extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Error$FragmentInline extends Error, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Error$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Error<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Error { + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`message\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } -// -------------- -// Interface Type Interface -// -------------- +// Interface Type: Interface +// -------------------------------------------------------------------------------------------------- -export interface Interface extends $Select.Bases.ObjectLike { - id?: Interface.id - ___on_Object1ImplementingInterface?: Object1ImplementingInterface - ___on_Object2ImplementingInterface?: Object2ImplementingInterface +export interface Interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + id?: Interface.id<$Scalars> + ___on_Object1ImplementingInterface?: Object1ImplementingInterface<$Scalars> + ___on_Object2ImplementingInterface?: Object2ImplementingInterface<$Scalars> /** * Inline fragments for field groups. @@ -3397,7 +4347,9 @@ export interface Interface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Interface$FragmentInline | Interface$FragmentInline[] + ___?: + | Interface$FragmentInline<$Scalars> + | Interface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -3410,17 +4362,30 @@ export interface Interface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Interface$FragmentInline extends Interface, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Interface$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Interface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Interface { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -3453,11 +4418,11 @@ export namespace Interface { // ----------------------------------------| Entrypoint Interface | -export interface Bar extends $Select.Bases.ObjectLike { +export interface Bar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the \`int\` field on the \`Bar\` object. Its type is \`Int\` (a \`Scalar\`). */ - int?: Bar.int$Expanded | $Select.SelectAlias.SelectAlias + int?: Bar.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3467,7 +4432,9 @@ export interface Bar extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Bar$FragmentInline | Bar$FragmentInline[] + ___?: + | Bar$FragmentInline<$Scalars> + | Bar$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3479,19 +4446,32 @@ export interface Bar extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Bar$FragmentInline extends Bar, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Bar$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Bar<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Bar { + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`int\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -3508,11 +4488,13 @@ export namespace Bar { // ----------------------------------------| Entrypoint Interface | -export interface DateObject1 extends $Select.Bases.ObjectLike { +export interface DateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`date1\` field on the \`DateObject1\` object. Its type is \`Date\` (a \`Scalar\`). */ - date1?: DateObject1.date1$Expanded | $Select.SelectAlias.SelectAlias + date1?: DateObject1.date1$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3522,7 +4504,9 @@ export interface DateObject1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateObject1$FragmentInline | DateObject1$FragmentInline[] + ___?: + | DateObject1$FragmentInline<$Scalars> + | DateObject1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3534,19 +4518,32 @@ export interface DateObject1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateObject1$FragmentInline extends DateObject1, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateObject1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateObject1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace DateObject1 { + export type date1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + + export interface date1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`date1\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date1$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date1 = $Select.Indicator.NoArgsIndicator + export type date1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + > } // @@ -3563,11 +4560,13 @@ export namespace DateObject1 { // ----------------------------------------| Entrypoint Interface | -export interface DateObject2 extends $Select.Bases.ObjectLike { +export interface DateObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`date2\` field on the \`DateObject2\` object. Its type is \`Date\` (a \`Scalar\`). */ - date2?: DateObject2.date2$Expanded | $Select.SelectAlias.SelectAlias + date2?: DateObject2.date2$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3577,7 +4576,9 @@ export interface DateObject2 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateObject2$FragmentInline | DateObject2$FragmentInline[] + ___?: + | DateObject2$FragmentInline<$Scalars> + | DateObject2$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3589,19 +4590,32 @@ export interface DateObject2 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateObject2$FragmentInline extends DateObject2, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateObject2$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateObject2<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace DateObject2 { + export type date2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date2$SelectionSet<$Scalars> + + export interface date2$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`date2\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date2$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date2 = $Select.Indicator.NoArgsIndicator + export type date2$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date2$SelectionSet<$Scalars> + > } // @@ -3618,15 +4632,17 @@ export namespace DateObject2 { // ----------------------------------------| Entrypoint Interface | -export interface ErrorOne extends $Select.Bases.ObjectLike { +export interface ErrorOne<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`infoId\` field on the \`ErrorOne\` object. Its type is \`ID\` (a \`Scalar\`). */ - infoId?: ErrorOne.infoId$Expanded | $Select.SelectAlias.SelectAlias + infoId?: ErrorOne.infoId$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`message\` field on the \`ErrorOne\` object. Its type is \`String\` (a \`Scalar\`). */ - message?: ErrorOne.message$Expanded | $Select.SelectAlias.SelectAlias + message?: ErrorOne.message$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3636,7 +4652,9 @@ export interface ErrorOne extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ErrorOne$FragmentInline | ErrorOne$FragmentInline[] + ___?: + | ErrorOne$FragmentInline<$Scalars> + | ErrorOne$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3648,28 +4666,54 @@ export interface ErrorOne extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ErrorOne$FragmentInline extends ErrorOne, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ErrorOne$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ErrorOne<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ErrorOne { + export type infoId<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | infoId$SelectionSet<$Scalars> + + export interface infoId$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`infoId\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type infoId$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type infoId$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | infoId$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> - export type infoId = $Select.Indicator.NoArgsIndicator + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`message\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } // @@ -3686,15 +4730,17 @@ export namespace ErrorOne { // ----------------------------------------| Entrypoint Interface | -export interface ErrorTwo extends $Select.Bases.ObjectLike { +export interface ErrorTwo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`infoInt\` field on the \`ErrorTwo\` object. Its type is \`Int\` (a \`Scalar\`). */ - infoInt?: ErrorTwo.infoInt$Expanded | $Select.SelectAlias.SelectAlias + infoInt?: ErrorTwo.infoInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`message\` field on the \`ErrorTwo\` object. Its type is \`String\` (a \`Scalar\`). */ - message?: ErrorTwo.message$Expanded | $Select.SelectAlias.SelectAlias + message?: ErrorTwo.message$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3704,7 +4750,9 @@ export interface ErrorTwo extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ErrorTwo$FragmentInline | ErrorTwo$FragmentInline[] + ___?: + | ErrorTwo$FragmentInline<$Scalars> + | ErrorTwo$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3716,28 +4764,54 @@ export interface ErrorTwo extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ErrorTwo$FragmentInline extends ErrorTwo, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ErrorTwo$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ErrorTwo<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ErrorTwo { + export type infoInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | infoInt$SelectionSet<$Scalars> + + export interface infoInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`infoInt\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type infoInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type infoInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | infoInt$SelectionSet<$Scalars> + > - export type infoInt = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`message\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } // @@ -3757,11 +4831,11 @@ export namespace ErrorTwo { /** * Object documentation. */ -export interface Foo extends $Select.Bases.ObjectLike { +export interface Foo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the \`id\` field on the \`Foo\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: Foo.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Foo.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3771,7 +4845,9 @@ export interface Foo extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Foo$FragmentInline | Foo$FragmentInline[] + ___?: + | Foo$FragmentInline<$Scalars> + | Foo$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3783,19 +4859,32 @@ export interface Foo extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Foo$FragmentInline extends Foo, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Foo$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Foo<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Foo { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -3812,27 +4901,33 @@ export namespace Foo { // ----------------------------------------| Entrypoint Interface | -export interface Object1 extends $Select.Bases.ObjectLike { +export interface Object1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + /** + * Select the \`ABCEnum\` field on the \`Object1\` object. Its type is Enum. + */ + ABCEnum?: Object1.ABCEnum$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`boolean\` field on the \`Object1\` object. Its type is \`Boolean\` (a \`Scalar\`). */ - boolean?: Object1.$boolean$Expanded | $Select.SelectAlias.SelectAlias + boolean?: Object1.$boolean$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`float\` field on the \`Object1\` object. Its type is \`Float\` (a \`Scalar\`). */ - float?: Object1.float$Expanded | $Select.SelectAlias.SelectAlias + float?: Object1.float$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`id\` field on the \`Object1\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: Object1.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Object1.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`int\` field on the \`Object1\` object. Its type is \`Int\` (a \`Scalar\`). */ - int?: Object1.int$Expanded | $Select.SelectAlias.SelectAlias + int?: Object1.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`string\` field on the \`Object1\` object. Its type is \`String\` (a \`Scalar\`). */ - string?: Object1.$string$Expanded | $Select.SelectAlias.SelectAlias + string?: Object1.$string$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3842,7 +4937,9 @@ export interface Object1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object1$FragmentInline | Object1$FragmentInline[] + ___?: + | Object1$FragmentInline<$Scalars> + | Object1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3854,55 +4951,142 @@ export interface Object1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object1$FragmentInline extends Object1, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Object1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Object1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object1 { + export type ABCEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | ABCEnum$SelectionSet<$Scalars> + + export interface ABCEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`ABCEnum\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type ABCEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | ABCEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $boolean<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + + export interface $boolean$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`$boolean\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $boolean$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $boolean$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + > - export type $boolean = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type float<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | float$SelectionSet<$Scalars> + + export interface float$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`float\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type float$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type float$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | float$SelectionSet<$Scalars> + > - export type float = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > - export type id = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`int\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > - export type int = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type $string<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + + export interface $string$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`$string\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $string$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type $string = $Select.Indicator.NoArgsIndicator + export type $string$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + > } // @@ -3919,15 +5103,21 @@ export namespace Object1 { // ----------------------------------------| Entrypoint Interface | -export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { +export interface Object1ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`id\` field on the \`Object1ImplementingInterface\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: Object1ImplementingInterface.id$Expanded | $Select.SelectAlias.SelectAlias + id?: + | Object1ImplementingInterface.id$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`int\` field on the \`Object1ImplementingInterface\` object. Its type is \`Int\` (a \`Scalar\`). */ - int?: Object1ImplementingInterface.int$Expanded | $Select.SelectAlias.SelectAlias + int?: + | Object1ImplementingInterface.int$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -3937,7 +5127,9 @@ export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object1ImplementingInterface$FragmentInline | Object1ImplementingInterface$FragmentInline[] + ___?: + | Object1ImplementingInterface$FragmentInline<$Scalars> + | Object1ImplementingInterface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -3949,30 +5141,54 @@ export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object1ImplementingInterface$FragmentInline - extends Object1ImplementingInterface, $Select.Directive.$Groups.InlineFragment.Fields -{} +export interface Object1ImplementingInterface$FragmentInline< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, +> extends Object1ImplementingInterface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object1ImplementingInterface { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`int\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -3989,17 +5205,21 @@ export namespace Object1ImplementingInterface { // ----------------------------------------| Entrypoint Interface | -export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { +export interface Object2ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`boolean\` field on the \`Object2ImplementingInterface\` object. Its type is \`Boolean\` (a \`Scalar\`). */ boolean?: - | Object2ImplementingInterface.$boolean$Expanded - | $Select.SelectAlias.SelectAlias + | Object2ImplementingInterface.$boolean$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the \`id\` field on the \`Object2ImplementingInterface\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: Object2ImplementingInterface.id$Expanded | $Select.SelectAlias.SelectAlias + id?: + | Object2ImplementingInterface.id$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -4009,7 +5229,9 @@ export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object2ImplementingInterface$FragmentInline | Object2ImplementingInterface$FragmentInline[] + ___?: + | Object2ImplementingInterface$FragmentInline<$Scalars> + | Object2ImplementingInterface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -4021,30 +5243,54 @@ export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object2ImplementingInterface$FragmentInline - extends Object2ImplementingInterface, $Select.Directive.$Groups.InlineFragment.Fields -{} +export interface Object2ImplementingInterface$FragmentInline< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, +> extends Object2ImplementingInterface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object2ImplementingInterface { + export type $boolean<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + + export interface $boolean$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`$boolean\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $boolean$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $boolean$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + > - export type $boolean = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -4061,15 +5307,17 @@ export namespace Object2ImplementingInterface { // ----------------------------------------| Entrypoint Interface | -export interface ObjectNested extends $Select.Bases.ObjectLike { +export interface ObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`id\` field on the \`ObjectNested\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: ObjectNested.id$Expanded | $Select.SelectAlias.SelectAlias + id?: ObjectNested.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the \`object\` field on the \`ObjectNested\` object. Its type is Object. */ - object?: ObjectNested.$object$Expanded | $Select.SelectAlias.SelectAlias + object?: ObjectNested.$object$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -4079,7 +5327,9 @@ export interface ObjectNested extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ObjectNested$FragmentInline | ObjectNested$FragmentInline[] + ___?: + | ObjectNested$FragmentInline<$Scalars> + | ObjectNested$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -4091,22 +5341,51 @@ export interface ObjectNested extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ObjectNested$FragmentInline extends ObjectNested, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ObjectNested$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ObjectNested<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ObjectNested { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $object<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $object$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface $object$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} - export interface $object extends _RefDefs._Object1 {} - export type $object$Expanded = $object + // --- expanded --- + + /** + * This is the "expanded" version of the \`$object\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $object$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $object$SelectionSet<$Scalars> + > } // @@ -4123,11 +5402,15 @@ export namespace ObjectNested { // ----------------------------------------| Entrypoint Interface | -export interface ObjectUnion extends $Select.Bases.ObjectLike { +export interface ObjectUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`fooBarUnion\` field on the \`ObjectUnion\` object. Its type is Union. */ - fooBarUnion?: ObjectUnion.fooBarUnion$Expanded | $Select.SelectAlias.SelectAlias + fooBarUnion?: + | ObjectUnion.fooBarUnion$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -4137,7 +5420,9 @@ export interface ObjectUnion extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ObjectUnion$FragmentInline | ObjectUnion$FragmentInline[] + ___?: + | ObjectUnion$FragmentInline<$Scalars> + | ObjectUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -4149,13 +5434,31 @@ export interface ObjectUnion extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ObjectUnion$FragmentInline extends ObjectUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ObjectUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ObjectUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ObjectUnion { - export interface fooBarUnion extends _RefDefs._FooBarUnion {} - export type fooBarUnion$Expanded = fooBarUnion + export type fooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = fooBarUnion$SelectionSet< + $Scalars + > + + export interface fooBarUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the \`fooBarUnion\` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type fooBarUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + fooBarUnion$SelectionSet<$Scalars> + > } // @@ -4172,11 +5475,13 @@ export namespace ObjectUnion { // ----------------------------------------| Entrypoint Interface | -export interface lowerCaseObject extends $Select.Bases.ObjectLike { +export interface lowerCaseObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`id\` field on the \`lowerCaseObject\` object. Its type is \`ID\` (a \`Scalar\`). */ - id?: lowerCaseObject.id$Expanded | $Select.SelectAlias.SelectAlias + id?: lowerCaseObject.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -4186,7 +5491,9 @@ export interface lowerCaseObject extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseObject$FragmentInline | lowerCaseObject$FragmentInline[] + ___?: + | lowerCaseObject$FragmentInline<$Scalars> + | lowerCaseObject$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -4198,21 +5505,32 @@ export interface lowerCaseObject extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseObject$FragmentInline - extends lowerCaseObject, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseObject$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseObject<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace lowerCaseObject { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`id\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -4229,11 +5547,13 @@ export namespace lowerCaseObject { // ----------------------------------------| Entrypoint Interface | -export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { +export interface lowerCaseObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the \`int\` field on the \`lowerCaseObject2\` object. Its type is \`Int\` (a \`Scalar\`). */ - int?: lowerCaseObject2.int$Expanded | $Select.SelectAlias.SelectAlias + int?: lowerCaseObject2.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -4243,7 +5563,9 @@ export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseObject2$FragmentInline | lowerCaseObject2$FragmentInline[] + ___?: + | lowerCaseObject2$FragmentInline<$Scalars> + | lowerCaseObject2$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -4255,21 +5577,32 @@ export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseObject2$FragmentInline - extends lowerCaseObject2, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseObject2$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseObject2<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace lowerCaseObject2 { + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the \`int\` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -4288,9 +5621,9 @@ export namespace lowerCaseObject2 { // // -export interface DateUnion { - ___on_DateObject1?: DateObject1 - ___on_DateObject2?: DateObject2 +export interface DateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_DateObject1?: DateObject1<$Scalars> + ___on_DateObject2?: DateObject2<$Scalars> /** * Inline fragments for field groups. @@ -4300,7 +5633,9 @@ export interface DateUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateUnion$FragmentInline | DateUnion$FragmentInline[] + ___?: + | DateUnion$FragmentInline<$Scalars> + | DateUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -4312,14 +5647,16 @@ export interface DateUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateUnion$FragmentInline extends DateUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} /** * Union documentation. */ -export interface FooBarUnion { - ___on_Bar?: Bar - ___on_Foo?: Foo +export interface FooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_Bar?: Bar<$Scalars> + ___on_Foo?: Foo<$Scalars> /** * Inline fragments for field groups. @@ -4329,7 +5666,9 @@ export interface FooBarUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: FooBarUnion$FragmentInline | FooBarUnion$FragmentInline[] + ___?: + | FooBarUnion$FragmentInline<$Scalars> + | FooBarUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -4341,12 +5680,14 @@ export interface FooBarUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface FooBarUnion$FragmentInline extends FooBarUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface FooBarUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends FooBarUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -export interface Result { - ___on_ErrorOne?: ErrorOne - ___on_ErrorTwo?: ErrorTwo - ___on_Object1?: Object1 +export interface Result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_ErrorOne?: ErrorOne<$Scalars> + ___on_ErrorTwo?: ErrorTwo<$Scalars> + ___on_Object1?: Object1<$Scalars> /** * Inline fragments for field groups. @@ -4356,7 +5697,9 @@ export interface Result { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Result$FragmentInline | Result$FragmentInline[] + ___?: + | Result$FragmentInline<$Scalars> + | Result$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -4368,11 +5711,13 @@ export interface Result { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Result$FragmentInline extends Result, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Result$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Result<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -export interface lowerCaseUnion { - ___on_lowerCaseObject?: lowerCaseObject - ___on_lowerCaseObject2?: lowerCaseObject2 +export interface lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_lowerCaseObject?: lowerCaseObject<$Scalars> + ___on_lowerCaseObject2?: lowerCaseObject2<$Scalars> /** * Inline fragments for field groups. @@ -4382,7 +5727,9 @@ export interface lowerCaseUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseUnion$FragmentInline | lowerCaseUnion$FragmentInline[] + ___?: + | lowerCaseUnion$FragmentInline<$Scalars> + | lowerCaseUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -4394,8 +5741,8 @@ export interface lowerCaseUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseUnion$FragmentInline - extends lowerCaseUnion, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} /** @@ -4405,35 +5752,44 @@ export interface lowerCaseUnion$FragmentInline * For example imagine \`Query.Foo\` field with type also called \`Foo\`. Our generated interfaces for each field * would end up with an error of \`export interface Foo extends Foo ...\` */ -export namespace _RefDefs { - export type _Mutation = Mutation - export type _Query = Query - export type _ABCEnum = ABCEnum - export type _Case = Case - export type _InputObject = InputObject - export type _InputObjectCircular = InputObjectCircular - export type _InputObjectNested = InputObjectNested - export type _InputObjectNestedNonNull = InputObjectNestedNonNull - export type _DateInterface1 = DateInterface1 - export type _Error = Error - export type _Interface = Interface - export type _Bar = Bar - export type _DateObject1 = DateObject1 - export type _DateObject2 = DateObject2 - export type _ErrorOne = ErrorOne - export type _ErrorTwo = ErrorTwo - export type _Foo = Foo - export type _Object1 = Object1 - export type _Object1ImplementingInterface = Object1ImplementingInterface - export type _Object2ImplementingInterface = Object2ImplementingInterface - export type _ObjectNested = ObjectNested - export type _ObjectUnion = ObjectUnion - export type _lowerCaseObject = lowerCaseObject - export type _lowerCaseObject2 = lowerCaseObject2 - export type _DateUnion = DateUnion - export type _FooBarUnion = FooBarUnion - export type _Result = Result - export type _lowerCaseUnion = lowerCaseUnion +export namespace $NamedTypes { + export type $Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Mutation<$Scalars> + export type $Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Query<$Scalars> + export type $ABCEnum = ABCEnum + export type $Case = Case + export type $InputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObject<$Scalars> + export type $InputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObjectCircular< + $Scalars + > + export type $InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObjectNested< + $Scalars + > + export type $InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + InputObjectNestedNonNull<$Scalars> + export type $DateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateInterface1<$Scalars> + export type $Error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Error<$Scalars> + export type $Interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Interface<$Scalars> + export type $Bar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Bar<$Scalars> + export type $DateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateObject1<$Scalars> + export type $DateObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateObject2<$Scalars> + export type $ErrorOne<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ErrorOne<$Scalars> + export type $ErrorTwo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ErrorTwo<$Scalars> + export type $Foo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Foo<$Scalars> + export type $Object1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Object1<$Scalars> + export type $Object1ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + Object1ImplementingInterface<$Scalars> + export type $Object2ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + Object2ImplementingInterface<$Scalars> + export type $ObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ObjectNested<$Scalars> + export type $ObjectUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ObjectUnion<$Scalars> + export type $lowerCaseObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseObject<$Scalars> + export type $lowerCaseObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseObject2< + $Scalars + > + export type $DateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateUnion<$Scalars> + export type $FooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = FooBarUnion<$Scalars> + export type $Result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Result<$Scalars> + export type $lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseUnion<$Scalars> } " `; diff --git a/src/generator/generators/MethodsDocument.ts b/src/generator/generators/MethodsDocument.ts index 16f8dd9f2..89854a9ea 100644 --- a/src/generator/generators/MethodsDocument.ts +++ b/src/generator/generators/MethodsDocument.ts @@ -12,10 +12,9 @@ export const ModuleGeneratorMethodsDocument = createModuleGenerator( code(`import type * as Utilities from '${config.paths.imports.grafflePackage.utilitiesForGenerated}'`) code(`import type { ${identifiers.Schema} } from './${ModuleGeneratorSchema.name}.js'`) code() - - code(`export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, + code(`export interface Document<$Context extends Utilities.ClientContext> { + <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>): Utilities.DocumentRunner< + $Context, ${identifiers.Schema}, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -23,11 +22,10 @@ export const ModuleGeneratorMethodsDocument = createModuleGenerator( > }`) code() - code(` export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } `) }, diff --git a/src/generator/generators/MethodsRoot.ts b/src/generator/generators/MethodsRoot.ts index 115ec20cd..b8bb81c0a 100644 --- a/src/generator/generators/MethodsRoot.ts +++ b/src/generator/generators/MethodsRoot.ts @@ -1,20 +1,19 @@ // todo remove use of Utils.Aug when schema errors not in use import { Grafaid } from '../../lib/grafaid/__.js' +import { identifiers } from '../helpers/identifiers.js' import { createModuleGenerator } from '../helpers/moduleGenerator.js' import { createCodeGenerator } from '../helpers/moduleGeneratorRunner.js' import { renderDocumentation, renderName } from '../helpers/render.js' import { ModuleGeneratorSchema } from './Schema.js' import { ModuleGeneratorSelectionSets } from './SelectionSets.js' -const identifiers = { - Schema: `Schema`, -} - export const ModuleGeneratorMethodsRoot = createModuleGenerator( `MethodsRoot`, ({ config, code }) => { code(`import { type Simplify } from 'type-fest'`) - code(`import type * as Utils from '${config.paths.imports.grafflePackage.utilitiesForGenerated}';`) + code( + `import type * as ${identifiers.$$Utilities} from '${config.paths.imports.grafflePackage.utilitiesForGenerated}';`, + ) code(`import type { InferResult } from '${config.paths.imports.grafflePackage.schema}';`) code(`import type { ${identifiers.Schema} } from './${ModuleGeneratorSchema.name}.js'`) code(`import type * as SelectionSet from './${ModuleGeneratorSelectionSets.name}.js'`) @@ -28,12 +27,12 @@ export const ModuleGeneratorMethodsRoot = createModuleGenerator( }) code(` - export interface BuilderMethodsRoot<$Config extends Utils.Config> { + export interface BuilderMethodsRoot<$Context extends ${identifiers.$$Utilities}.ClientContext> { ${ config.schema.kindMap.GraphQLRootType.map(node => { const operationName = Grafaid.RootTypeNameToOperationName[node.name as keyof typeof Grafaid.RootTypeNameToOperationName] - return `${operationName}: ${node.name}Methods<$Config>` + return `${operationName}: ${node.name}Methods<$Context>` }).join(`\n`) } } @@ -41,13 +40,11 @@ export const ModuleGeneratorMethodsRoot = createModuleGenerator( code() code(` - export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { + export interface BuilderMethodsRootFn extends ${identifiers.$$Utilities}.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } `) - - // console.log(code.join(`\n`)) }, ) @@ -55,23 +52,21 @@ const renderRootType = createCodeGenerator<{ node: Grafaid.Schema.ObjectType }>( const fieldMethods = renderFieldMethods({ config, node }) code(` - export interface ${node.name}Methods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.${node.name}>) => + export interface ${node.name}Methods<$Context extends ${identifiers.$$Utilities}.ClientContext> { + $batch: <$SelectionSet>(selectionSet: ${identifiers.$$Utilities}.Exact<$SelectionSet, SelectionSet.${node.name}<$Context['scalars']>>) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.${node.name}<$SelectionSet, ${identifiers.Schema}> + ${identifiers.$$Utilities}.HandleOutput< + $Context, + InferResult.${node.name}<$SelectionSet, ${identifiers.Schema}<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + ${identifiers.$$Utilities}.HandleOutputGraffleRootField< + $Context, { __typename: '${node.name}' }, '__typename' > @@ -93,7 +88,7 @@ const renderFieldMethods = createCodeGenerator<{ node: Grafaid.Schema.ObjectType // dprint-ignore code(` - ${field.name}: <$SelectionSet>(selectionSet${isOptional ? `?` : ``}: Utils.Exact<$SelectionSet, SelectionSet.${renderName(node)}.${renderName(field)}>) => + ${field.name}: <$SelectionSet>(selectionSet${isOptional ? `?` : ``}: ${identifiers.$$Utilities}.Exact<$SelectionSet, SelectionSet.${renderName(node)}.${renderName(field)}<$Context['scalars']>>) => ${Helpers.returnType(node.name, field.name, `$SelectionSet`)} `) } @@ -104,9 +99,9 @@ namespace Helpers { return ` Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.${rootName}<{ ${fieldName}: ${selectionSet}}, ${identifiers.Schema}>, + ${identifiers.$$Utilities}.HandleOutputGraffleRootField< + $Context, + InferResult.${rootName}<{ ${fieldName}: ${selectionSet}}, ${identifiers.Schema}<$Context['scalars']>>, '${fieldName}' > > diff --git a/src/generator/generators/Scalar.ts b/src/generator/generators/Scalar.ts index e619d99f6..794312cab 100644 --- a/src/generator/generators/Scalar.ts +++ b/src/generator/generators/Scalar.ts @@ -1,20 +1,18 @@ import { Grafaid } from '../../lib/grafaid/__.js' +import { identifiers } from '../helpers/identifiers.js' import { createModuleGenerator } from '../helpers/moduleGenerator.js' import { typeTitle2 } from '../helpers/render.js' export const ModuleGeneratorScalar = createModuleGenerator( `Scalar`, ({ config, code }) => { - const identifiers = { - CustomScalars: `CustomScalars`, - StandardScalar: `StandardScalar`, - } - // todo test case for when this is true const isNeedCustomScalarDefaults = Grafaid.Schema.KindMap.hasCustomScalars(config.schema.kindMap) && !config.options.customScalars - code(`import type { SchemaKit } from '${config.paths.imports.grafflePackage.schema}'`) + code( + `import type * as ${identifiers.$$Utilities} from '${config.paths.imports.grafflePackage.utilitiesForGenerated}'`, + ) code() if (Grafaid.Schema.KindMap.hasCustomScalars(config.schema.kindMap) && config.options.customScalars) { @@ -32,8 +30,12 @@ export const ModuleGeneratorScalar = createModuleGenerator( // "Exported type alias 'DateDecoded' has or is using private name 'Date'." `) code(`type ${scalar.name}_ = typeof ${identifiers.CustomScalars}.${scalar.name}`) - code(`export type ${scalar.name}Decoded = SchemaKit.Scalar.GetDecoded<${scalar.name}_>`) - code(`export type ${scalar.name}Encoded = SchemaKit.Scalar.GetEncoded<${scalar.name}_>`) + code( + `export type ${scalar.name}Decoded = ${identifiers.$$Utilities}.SchemaKit.Scalar.GetDecoded<${scalar.name}_>`, + ) + code( + `export type ${scalar.name}Encoded = ${identifiers.$$Utilities}.SchemaKit.Scalar.GetEncoded<${scalar.name}_>`, + ) code() } } @@ -51,12 +53,13 @@ export const ModuleGeneratorScalar = createModuleGenerator( for (const scalar of config.schema.kindMap.GraphQLScalarTypeCustom) { code(typeTitle2(`custom scalar type`)(scalar)) code() - code(`import type { String as ${scalar.name} } from '${config.paths.imports.grafflePackage.scalars}'`) - code() - code(`export { String as ${scalar.name} } from '${config.paths.imports.grafflePackage.scalars}'`) - code(`export type ${scalar.name}Decoded = SchemaKit.Scalar.GetDecoded<${scalar.name}>`) - code(`export type ${scalar.name}Encoded = SchemaKit.Scalar.GetEncoded<${scalar.name}>`) - code() + code(`export type ${scalar.name} = ${identifiers.$$Utilities}.SchemaKit.Scalar.ScalarCodecless<'Date'>`) + // code(`import type { String as ${scalar.name} } from '${config.paths.imports.grafflePackage.scalars}'`) + // code() + // code(`export { String as ${scalar.name} } from '${config.paths.imports.grafflePackage.scalars}'`) + // code(`export type ${scalar.name}Decoded = SchemaKit.Scalar.GetDecoded<${scalar.name}>`) + // code(`export type ${scalar.name}Encoded = SchemaKit.Scalar.GetEncoded<${scalar.name}>`) + // code() } } }, diff --git a/src/generator/generators/Schema.ts b/src/generator/generators/Schema.ts index 20fb8538c..7c0d840de 100644 --- a/src/generator/generators/Schema.ts +++ b/src/generator/generators/Schema.ts @@ -1,4 +1,3 @@ -import type { SchemaDrivenDataMap } from '../../entrypoints/utilities-for-generated.js' import type { SchemaKit } from '../../layers/1_Schema/__.js' import type { GlobalRegistry } from '../../layers/GlobalRegistry.js' import { Code } from '../../lib/Code.js' @@ -19,6 +18,7 @@ import { ModuleGeneratorScalar } from './Scalar.js' */ export interface Schema< $Extensions extends GlobalRegistry.TypeExtensions = GlobalRegistry.TypeExtensions, + $Scalars extends SchemaKit.Scalar.ScalarMap = SchemaKit.Scalar.ScalarMap, > { name: GlobalRegistry.ClientNames RootTypesPresent: ('Query' | 'Mutation' | 'Subscription')[] @@ -40,9 +40,10 @@ export interface Schema< objects: Record unions: Record interfaces: Record - customScalars: { - input: SchemaDrivenDataMap - } + /** + * A map of scalar definitions. Useful for custom scalars. + */ + scalars: $Scalars extensions: $Extensions } @@ -87,7 +88,7 @@ export const SchemaGenerator = createCodeGenerator( code(` import type * as Data from './${ModuleGeneratorData.name}.js' import type * as ${identifiers.MethodsRoot} from './${ModuleGeneratorMethodsRoot.name}.js' - import type * as ${identifiers.Utilities} from '${config.paths.imports.grafflePackage.utilitiesForGenerated}' + import type * as ${identifiers.$$Utilities} from '${config.paths.imports.grafflePackage.utilitiesForGenerated}' `) code() @@ -130,8 +131,8 @@ export const SchemaGenerator = createCodeGenerator( objects: Code.objectFromEntries(objects), unions: Code.objectFromEntries(unions), interfaces: Code.objectFromEntries(interfaces), - customScalars: `${identifiers.Utilities}.SchemaIndexBase['customScalars']`, - extensions: `Utilities.GlobalRegistry.TypeExtensions`, + scalars: `$Scalars`, + extensions: `${identifiers.$$Utilities}.GlobalRegistry.TypeExtensions`, } // --- Extensions --- @@ -149,7 +150,7 @@ export const SchemaGenerator = createCodeGenerator( // --- code( - `export interface ${identifiers.Schema} extends Utilities.SchemaIndexBase + `export interface ${identifiers.Schema}<$Scalars extends ${identifiers.$$Utilities}.SchemaKit.Scalar.ScalarMap = {}> extends ${identifiers.$$Utilities}.SchemaIndexBase ${Code.termObject(schema)} `, ) diff --git a/src/generator/generators/SelectionSets.test-d.ts b/src/generator/generators/SelectionSets.test-d.ts index 015997fe4..99ecfc005 100644 --- a/src/generator/generators/SelectionSets.test-d.ts +++ b/src/generator/generators/SelectionSets.test-d.ts @@ -1,7 +1,10 @@ import { assertType, test } from 'vitest' +import type { Date } from '../../../tests/_/fixtures/scalars.js' +import { db } from '../../../tests/_/schemas/db.js' import type * as SelectionSets from '../../../tests/_/schemas/kitchen-sink/graffle/modules/SelectionSets.js' type Q = SelectionSets.Query +type QWithDate = SelectionSets.Query<{ Date: typeof Date }> // dprint-ignore test(`Query`, () => { @@ -220,12 +223,17 @@ test(`Query`, () => { // @ts-expect-error wrong type assertType({ dateArg: { $: { date: 0 } } }) assertType({ dateArg: { $: { date: null } } }) - assertType({ dateArg: { $: { date: new Date(0) } } }) + assertType({ dateArg: { $: { date: db.date0Encoded } } }) + assertType({ dateArg: { $: { date: db.date0 } } }) // input object arg - assertType({ stringWithArgInputObjectRequired: { $: { input: { id: ``, idRequired: ``, dateRequired: new Date(0) } } } }) - assertType({ stringWithArgInputObjectRequired: { $: { input: { id: null, idRequired: ``, dateRequired: new Date(0) } } } }) - assertType({ stringWithArgInputObjectRequired: { $: { input: { idRequired: ``, dateRequired: new Date(0) } } } }) + assertType({ stringWithArgInputObjectRequired: { $: { input: { id: ``, idRequired: ``, dateRequired: db.date0Encoded } } } }) + assertType({ stringWithArgInputObjectRequired: { $: { input: { id: null, idRequired: ``, dateRequired: db.date0Encoded } } } }) + assertType({ stringWithArgInputObjectRequired: { $: { input: { idRequired: ``, dateRequired: db.date0Encoded } } } }) + assertType({ stringWithArgInputObjectRequired: { $: { input: { id: ``, idRequired: ``, dateRequired: db.date0 } } } }) + assertType({ stringWithArgInputObjectRequired: { $: { input: { id: null, idRequired: ``, dateRequired: db.date0 } } } }) + assertType({ stringWithArgInputObjectRequired: { $: { input: { idRequired: ``, dateRequired: db.date0 } } } }) + // @ts-expect-error missing "idRequired" field assertType({ stringWithArgInputObjectRequired: { $: { input: {} } } }) // type x = Exclude['$']['input'] diff --git a/src/generator/generators/SelectionSets.ts b/src/generator/generators/SelectionSets.ts index 553db22f6..d9f352d28 100644 --- a/src/generator/generators/SelectionSets.ts +++ b/src/generator/generators/SelectionSets.ts @@ -6,18 +6,26 @@ import { Code } from '../../lib/Code.js' import { Grafaid } from '../../lib/grafaid/__.js' import { analyzeArgsNullability } from '../../lib/grafaid/schema/args.js' import { RootTypeName } from '../../lib/grafaid/schema/schema.js' +import { isString } from '../../lib/prelude.js' +import { borderThinFullWidth } from '../../lib/text.js' +import { identifiers } from '../helpers/identifiers.js' import { createModuleGenerator } from '../helpers/moduleGenerator.js' import { createCodeGenerator } from '../helpers/moduleGeneratorRunner.js' import { getDocumentation, renderDocumentation, renderName, title1, typeTitle2SelectionSet } from '../helpers/render.js' import { ModuleGeneratorScalar } from './Scalar.js' +const $ScalarsTypeParameter = `$Scalars extends ${identifiers.$$Utilities}.SchemaKit.Scalar.ScalarMap = {}` +// `$Scalars extends ${identifiers.$$Utilities}.SchemaKit.Scalar.ScalarMap` + export const ModuleGeneratorSelectionSets = createModuleGenerator( `SelectionSets`, ({ config, code }) => { code() code(`import type { Select as $Select } from '${config.paths.imports.grafflePackage.schema}'`) - code(`import type * as $Utilities from '${config.paths.imports.grafflePackage.utilitiesForGenerated}'`) + code( + `import type * as ${identifiers.$$Utilities} from '${config.paths.imports.grafflePackage.utilitiesForGenerated}'`, + ) if (Grafaid.Schema.KindMap.hasCustomScalars(config.schema.kindMap)) { code(`import type * as $Scalar from './${ModuleGeneratorScalar.name}.js'`) } @@ -29,9 +37,11 @@ export const ModuleGeneratorSelectionSets = createModuleGenerator( `// Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with.`, ) code( - `export interface $Document {`, - Grafaid.Schema.KindMap.hasQuery(config.schema.kindMap) ? `query?: Record` : null, - Grafaid.Schema.KindMap.hasMutation(config.schema.kindMap) ? `mutation?: Record` : null, + `export interface $Document<${$ScalarsTypeParameter}> {`, + Grafaid.Schema.KindMap.hasQuery(config.schema.kindMap) ? `query?: Record>` : null, + Grafaid.Schema.KindMap.hasMutation(config.schema.kindMap) + ? `mutation?: Record>` + : null, `}`, ) code() @@ -45,14 +55,14 @@ export const ModuleGeneratorSelectionSets = createModuleGenerator( config.schema.kindMap.GraphQLUnionType, ].filter(_ => _.length > 0) - typesToRender.forEach((nodes) => { - const kind = Grafaid.Schema.getTypeKind(nodes[0]!) + typesToRender.forEach((types) => { + const kind = Grafaid.Schema.getTypeKind(types[0]!) code(title1(`${kind} Types`)) code() - nodes.forEach(node => { - code(kindRenderLookup[kind]({ config, node: node as never })) + types.forEach(type => { + code(GraphQLKindRenderMap[kind]({ config, type: type as never })) code() }) }) @@ -66,240 +76,222 @@ export const ModuleGeneratorSelectionSets = createModuleGenerator( * would end up with an error of \`export interface Foo extends Foo ...\` */ `) - code(renderRefDefs({ config, nodes: typesToRender.flat() })) + code(renderNamedTypesIndex({ config, types: typesToRender.flat() })) }, ) -const renderRefDefs = createCodeGenerator<{ nodes: Grafaid.Schema.NamedTypes[] }>( - ({ nodes, code }) => { - const refDefsRendered = nodes.map(node => `export type _${renderName(node)} = ${renderName(node)}`).join(`\n`) - const namespaceRendered = ` - export namespace _RefDefs { - ${refDefsRendered} - } - ` - code(namespaceRendered) - code() - }, -) - -const renderUnion = createCodeGenerator<{ node: Grafaid.Schema.UnionType }>( - ({ config, node, code }) => { - const doc = renderDocumentation(config, node) +const renderKindUnion = createCodeGenerator<{ type: Grafaid.Schema.UnionType }>( + ({ config, type, code }) => { + const doc = renderDocumentation(config, type) code(doc) - const memberTypes = node.getTypes() + const memberTypes = type.getTypes() + const fragmentsInlineType = memberTypes.map((type) => + `${Select.InlineFragment.typeConditionPRefix}${type.name}?: ${renderName(type)}<$Scalars>` + ) + .join( + `\n`, + ) code(` - export interface ${renderName(node)} { - ${ - memberTypes.map((type) => `${Select.InlineFragment.typeConditionPRefix}${type.name}?: ${renderName(type)}`) - .join( - `\n`, - ) - } - ${Helpers.fragmentInlineField(node)} - ${Helpers.__typenameField(`union`)} + export interface ${renderName(type)}<${$ScalarsTypeParameter}> { + ${fragmentsInlineType} + ${H.fragmentInlineField(type)} + ${H.__typenameField(`union`)} } `) - code(Helpers.fragmentInlineInterface(node)) + code(H.fragmentInlineInterface(type)) code() }, ) -const renderEnum = createCodeGenerator<{ node: Grafaid.Schema.EnumType }>( - ({ config, node, code }) => { - const doc = renderDocumentation(config, node) +const renderKindEnum = createCodeGenerator<{ type: Grafaid.Schema.EnumType }>( + ({ config, type, code }) => { + const doc = renderDocumentation(config, type) code(doc) - const values = Object.values(node.getValues()) - code(Helpers.type(renderName(node), values.map((value) => Code.string(value.name)).join(` | `))) + const values = Object.values(type.getValues()) + code(H.tsTypeTerminal(type, values.map((value) => Code.string(value.name)).join(` | `))) }, ) -const renderInputObject = createCodeGenerator<{ node: Grafaid.Schema.InputObjectType }>( - ({ config, node, code }) => { - const doc = renderDocumentation(config, node) +const renderKindInputObject = createCodeGenerator<{ type: Grafaid.Schema.InputObjectType }>( + ({ config, type, code }) => { + const doc = renderDocumentation(config, type) code(doc) - const fields = Object.values(node.getFields()) + const fields = Object.values(type.getFields()) code(` - export interface ${renderName(node)} { + export interface ${renderName(type)}<${$ScalarsTypeParameter}> { ${fields.map((field) => renderArgumentLike({ config, arg: field })).join(`\n`)} } `) }, ) -const renderInterface = createCodeGenerator<{ node: Grafaid.Schema.InterfaceType }>( - ({ config, node, code }) => { - const fields = Object.values(node.getFields()) +const renderKindInterface = createCodeGenerator<{ type: Grafaid.Schema.InterfaceType }>( + ({ config, type, code }) => { + const fields = Object.values(type.getFields()) const fieldsRendered = fields.map(field => { - return Helpers.outputField(field.name, `${renderName(node)}.${renderName(field)}`) + return H.outputFieldReference(field.name, `${renderName(type)}.${renderName(field)}`) }).join(`\n`) - const implementorTypes = Grafaid.Schema.KindMap.getInterfaceImplementors(config.schema.kindMap, node) + const implementorTypes = Grafaid.Schema.KindMap.getInterfaceImplementors(config.schema.kindMap, type) const onTypesRendered = implementorTypes.map(type => - Helpers.outputField(`${Select.InlineFragment.typeConditionPRefix}${type.name}`, renderName(type)) + H.outputFieldReference(`${Select.InlineFragment.typeConditionPRefix}${type.name}`, renderName(type)) ).join( ` \n `, ) code() - code(`// --------------`) - code(`// Interface Type ${node.name}`) - code(`// --------------`) + code(`// Interface Type: ${type.name}`) + code(`// ${borderThinFullWidth}`) code() - const doc = renderDocumentation(config, node) + const doc = renderDocumentation(config, type) code(doc) code(` - export interface ${renderName(node)} extends $Select.Bases.ObjectLike { + export interface ${H.referenceSig(type)} extends $Select.Bases.ObjectLike { ${fieldsRendered} ${onTypesRendered} - ${Helpers.fragmentInlineField(node)} - ${Helpers.__typenameField(`interface`)} + ${H.fragmentInlineField(type)} + ${H.__typenameField(`interface`)} } `) code() - code(Helpers.fragmentInlineInterface(node)) + code(H.fragmentInlineInterface(type)) code() code(` - export namespace ${renderName(node)} { - ${fields.map((field) => renderField({ config, field })).join(`\n`)} + export namespace ${renderName(type)} { + ${fields.map((field) => renderOutputField({ config, field })).join(`\n`)} } `) code() }, ) -const renderObject = createCodeGenerator<{ node: Grafaid.Schema.ObjectType }>( - ({ config, node, code }) => { - const fields = Object.values(node.getFields()) +const renderKindObject = createCodeGenerator<{ type: Grafaid.Schema.ObjectType }>( + ({ config, type, code }) => { + const fields = Object.values(type.getFields()) - code(typeTitle2SelectionSet(node)) + code(typeTitle2SelectionSet(type)) code() code(`// ----------------------------------------| Entrypoint Interface |`) code() - const propertiesRendered = fields.map(field => { - const nodeWhat = Grafaid.getTypeNameAndKind(Grafaid.Schema.getNamedType(field.type)) - const type = nodeWhat.kind === `Scalar` ? `\`${nodeWhat.name}\` (a \`Scalar\`)` : nodeWhat.kind + const fieldKeys = fields.map(field => { + const fieldTypeInfo = Grafaid.getTypeNameAndKind(Grafaid.Schema.getNamedType(field.type)) + const fieldKindOrScalarType = fieldTypeInfo.kind === `Scalar` + ? `\`${fieldTypeInfo.name}\` (a \`Scalar\`)` + : fieldTypeInfo.kind const doc = Code.TSDoc(` - Select the \`${field.name}\` field on the \`${node.name}\` object. Its type is ${type}. + Select the \`${field.name}\` field on the \`${type.name}\` object. Its type is ${fieldKindOrScalarType}. `) - const propertyRendered = Helpers.outputFieldAlisable( + const key = H.outputFieldKey( field.name, - `${renderName(node)}.${renderName(field)}`, + `${renderName(type)}.${renderName(field)}`, true, analyzeArgsNullability(field.args).isAllNullable, ) - return doc + `\n` + propertyRendered + return doc + + `\n` + + key }).join(`\n`) - const isRootType = node.name in RootTypeName + const isRootType = type.name in RootTypeName const extendsClause = isRootType ? `` : `extends $Select.Bases.ObjectLike` - const doc = renderDocumentation(config, node) + const doc = renderDocumentation(config, type) code(doc) code(` - export interface ${renderName(node)} ${extendsClause} { - ${propertiesRendered} - ${Helpers.fragmentInlineField(node)} - ${Helpers.__typenameField(`object`)} + export interface ${H.referenceSig(type)} ${extendsClause} { + ${fieldKeys} + ${H.fragmentInlineField(type)} + ${H.__typenameField(`object`)} } `) code() - code(Helpers.fragmentInlineInterface(node)) + code(H.fragmentInlineInterface(type)) code() - code(`// ----------------------------------------| Fields Interfaces |`) + code(`// ----------------------------------------| Fields |`) code() code(` - export namespace ${renderName(node)} { - ${fields.map((field) => renderField({ config, field })).join(`\n`)} + export namespace ${renderName(type)} { + ${fields.map((field) => renderOutputField({ config, field })).join(`\n// ${borderThinFullWidth}\n\n`)} } `) code() }, ) -const kindRenderLookup = { - GraphQLInputObjectType: renderInputObject, - GraphQLRootType: renderObject, - GraphQLObjectType: renderObject, - GraphQLEnumType: renderEnum, - GraphQLInterfaceType: renderInterface, - GraphQLUnionType: renderUnion, +const GraphQLKindRenderMap = { + GraphQLInputObjectType: renderKindInputObject, + GraphQLRootType: renderKindObject, + GraphQLObjectType: renderKindObject, + GraphQLEnumType: renderKindEnum, + GraphQLInterfaceType: renderKindInterface, + GraphQLUnionType: renderKindUnion, } -const renderField = createCodeGenerator<{ field: Grafaid.Schema.Field }>( +const renderOutputField = createCodeGenerator<{ field: Grafaid.Schema.Field }>( ({ config, field, code }) => { - const namedType = Grafaid.Schema.getNamedType(field.type) - const nameRendered = renderName(field) - - // code() - // code(`// -- .${nameRendered} --`) - // code() - - if (Grafaid.Schema.isScalarType(namedType) || Grafaid.Schema.isEnumType(namedType)) { - const argsAnalysis = analyzeArgsNullability(field.args) - const argFieldsRendered = renderArguments({ config, field }) - const argsRendered = renderArgumentsKey({ - config, - field, - argFieldsRendered: `${nameRendered}$SelectionSetArguments`, - }) + const argsAnalysis = analyzeArgsNullability(field.args) + const fieldNamedType = Grafaid.Schema.getNamedType(field.type) - if (argsAnalysis.hasAny) { - code( - `export type ${nameRendered}$SelectionSetArguments = ${argFieldsRendered}`, - ) - if (argsAnalysis.isAllNullable) { - code( - `export type ${nameRendered}$SelectionSet = $Utilities.Simplify<$Select.Bases.Base & { ${argsRendered} }>`, - ) - code() - code( - Helpers.typeExpanded( - nameRendered, - `$Utilities.UnionExpanded<$Select.Indicator.Indicator | ${nameRendered}$SelectionSet>`, - ), - ) - code() - code( - Helpers.type(nameRendered, `$Select.Indicator.Indicator | ${nameRendered}$SelectionSet`), - ) - code() - } else { - // 1+ arguments required. - // todo test that a directive can be passed with the intersection that otherwise cannot be. - code(Helpers.$interface(nameRendered, `$Select.Bases.Base`, argsRendered)) - code() - } - } else { - code(Helpers.typeExpanded(nameRendered, `$Select.Indicator.NoArgsIndicator$Expanded`)) - code() - code(Helpers.type(nameRendered, `$Select.Indicator.NoArgsIndicator`)) - code() - } - } else { - const argFieldsRendered = renderArguments({ config, field }) - const argsRendered = renderArgumentsKey({ config, field, argFieldsRendered }) - const sigRendered = `export interface ${nameRendered} extends _RefDefs._${renderName(namedType)}` - code(`${sigRendered} {${argsRendered ? `\n${argsRendered}\n` : ``}}`) - code(`export type ${nameRendered}$Expanded = ${nameRendered}`) + const fieldName = renderName(field) + const selectionSetName = fieldName + `$SelectionSet` + const argumentsName = fieldName + `$Arguments` + + const selectionSetRef = H.reference(selectionSetName) + const isCanBeIndicator = (Grafaid.Schema.isScalarType(fieldNamedType) || Grafaid.Schema.isEnumType(fieldNamedType)) + && argsAnalysis.isAllNullable + const indicator = isCanBeIndicator ? `$Select.Indicator.NoArgsIndicator` : `` + + code(H.tsType(field, Code.unionItems([indicator, selectionSetRef]))) + code() + + const propertyArguments = renderFieldPropertyArguments({ + config, + field, + argFieldsRendered: H.reference(argumentsName), + }) + + const isHasObjectLikeTypeReference = Grafaid.Schema.isObjectType(fieldNamedType) + || Grafaid.Schema.isInterfaceType(fieldNamedType) || Grafaid.Schema.isUnionType(fieldNamedType) + + const objectLikeTypeReference = isHasObjectLikeTypeReference + ? H.namedTypesReference(fieldNamedType) + : null + + code(H.tsInterface(selectionSetName, [`$Select.Bases.Base`, objectLikeTypeReference], propertyArguments)) + code() + + if (argsAnalysis.hasAny) { + const fields = field.args.map(arg => renderArgumentLike({ config, arg })).join(`\n`) + code(H.tsInterface(argumentsName, null, fields)) + code() } + + code(`// --- expanded ---`) + code() + + code(H.tsTypeExpanded(field, Code.unionItems([indicator, selectionSetRef]))) + code() + + code() }, ) -const renderArgumentsKey = createCodeGenerator<{ field: Grafaid.Schema.Field; argFieldsRendered: string }>( +const renderFieldPropertyArguments = createCodeGenerator< + { field: Grafaid.Schema.Field; argFieldsRendered: string } +>( ({ field, code, argFieldsRendered }) => { const argsAnalysis = analyzeArgsNullability(field.args) @@ -310,53 +302,44 @@ const renderArgumentsKey = createCodeGenerator<{ field: Grafaid.Schema.Field }>(({ config, field, code }) => { - const argFieldsRendered = field.args.map(arg => renderArgumentLike({ config, arg })).join(`\n`) - if (argFieldsRendered) { - code(`{\n${argFieldsRendered}\n}`) - code() - } -}) - const renderArgumentLike = createCodeGenerator<{ arg: Grafaid.Schema.Argument | Grafaid.Schema.InputField }>( ({ config, arg, code }) => { // todo do not import whole of graphql package here. Just import getNamedType. const enumKeyPrefix = Grafaid.Schema.isEnumType(Grafaid.Schema.getNamedType(arg.type)) ? Select.Arguments.enumKeyPrefix : `` - const typeRendered = renderArgType(arg.type) - const doc = getDocumentation(config, arg) - code(doc) - code(`${enumKeyPrefix}${arg.name}${Helpers.propOpt(arg.type)}: ${typeRendered}`) + const typeRendered = renderArgumentType(arg.type) + const tsDoc = getDocumentation(config, arg) + code(tsDoc) + code(`${enumKeyPrefix}${arg.name}${H.propOpt(arg.type)}: ${typeRendered}`) }, ) -const renderArgType = (type: Grafaid.Schema.InputTypes): string => { +const renderArgumentType = (type: Grafaid.Schema.InputTypes): string => { const sansNullabilityType = Grafaid.Schema.getNullableType(type) const nullableRendered = Grafaid.Schema.isNullableType(type) ? `| undefined | null` : `` if (Grafaid.Schema.isListType(sansNullabilityType)) { const innerType = Grafaid.Schema.getNullableType(sansNullabilityType.ofType) - return `Array<${renderArgType(innerType)}> ${nullableRendered}` + return `Array<${renderArgumentType(innerType)}> ${nullableRendered}` } if (Grafaid.Schema.isScalarType(sansNullabilityType)) { if (Grafaid.Schema.isScalarTypeCustom(sansNullabilityType)) { - const scalarTypeRendered = `$Scalar.${sansNullabilityType.name}Decoded` + const scalarTypeRendered = + `${identifiers.$$Utilities}.SchemaKit.Scalar.GetDecoded<${identifiers.$$Utilities}.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'${sansNullabilityType.name}', $Scalars>>` return `${scalarTypeRendered} ${nullableRendered}` } const scalarTypeRendered = @@ -364,46 +347,97 @@ const renderArgType = (type: Grafaid.Schema.InputTypes): string => { return `${scalarTypeRendered} ${nullableRendered}` } - return `_RefDefs._${renderName(sansNullabilityType)} ${nullableRendered}` + return `${H.namedTypesReference(sansNullabilityType)} ${nullableRendered}` } -namespace Helpers { +const renderNamedTypesIndex = createCodeGenerator<{ types: Grafaid.Schema.NamedTypes[] }>( + ({ types, code }) => { + const namedTypes = types.map(type => { + if (Grafaid.Schema.isEnumType(type)) { + return H.tsTypeTerminal(`$${renderName(type)}`, renderName(type)) + } + return H.tsType(`$${renderName(type)}`, H.reference(type)) + }).join(`\n`) + + code(` + export namespace $NamedTypes { + ${namedTypes} + } + `) + code() + }, +) + +// -------------------------------------------------------------------------------------------------- + +namespace H { + export type Name = string | Grafaid.Schema.NamedTypes | Grafaid.Schema.Field + + export const referenceSig = (type: Name) => { + return `${renderName(type)}<${$ScalarsTypeParameter}>` + } + + export const namedTypesReference = (type: Grafaid.Schema.NamedTypes) => { + return `$NamedTypes.$${reference(type)}` + } + + export const reference = (name: Name) => { + // A reference to an enum type can never make use of schema customizations. + if (Grafaid.Schema.isEnumType(name)) { + return renderName(name) + } + return `${renderName(name)}<$Scalars>` + } + export const propOpt = (type: Grafaid.Schema.Types) => { return Grafaid.Schema.isNullableType(type) ? `?` : `` } + export const maybeList = (type: string) => { return `${type} | Array<${type}>` } - export const $interface = (name: string, extendsClause: string | null, fields: string) => { - return `export interface ${name} ${extendsClause ? ` extends ${extendsClause}` : ``} { ${fields} }` + + export const tsInterface = (name: Name, extendsClause: null | (string | null)[], fields: string) => { + const extendsClause_ = extendsClause + ? ` extends ${isString(extendsClause) ? extendsClause : extendsClause.join(`, `)}` + : `` + return `export interface ${referenceSig(name)} ${extendsClause_} { ${fields} }` + } + + export const tsType = (name: Name, type: string) => { + return tsTypeTerminal(referenceSig(name), type) } - export const typeExpanded = (name: string, type: string) => { - const jsdoc = Code.TSDoc(` - This is the "expanded" version of the \`${name}\` type. It is identical except for the fact + + export const tsTypeExpanded = (name: Name, type: string) => { + const name_ = renderName(name) + const tsDoc = Code.TSDoc(` + This is the "expanded" version of the \`${name_}\` type. It is identical except for the fact that IDEs will display its contents (a union type) directly, rather than the name of this type. In some cases, this is a preferable DX, making the types easier to read for users. `) - return ` - ${jsdoc} - export type ${name}$Expanded = ${type} - ` + return tsTypeTerminal(referenceSig(`${name_}$Expanded`), `${identifiers.$$Utilities}.Simplify<${type}>`, tsDoc) } - export const type = (name: string, type: string) => { - return `export type ${name} = ${type}` + + export const tsTypeTerminal = (name: Name, type: string, tsDoc?: string) => { + const tsDoc_ = tsDoc ? `${tsDoc}\n` : `` + return `${tsDoc_}export type ${renderName(name)} = ${type}` } - export const outputField = (name: string, type: string) => { - return `${name}?: ${type}` + export const outputFieldReference = (name: string, type: string) => { + return `${name}?: ${H.reference(type)}` } - export const outputFieldAlisable = ( + export const outputFieldKey = ( name: string, type: string, aliasable: boolean = true, isHasExpanded: boolean = true, ) => { - const alias = aliasable ? `| $Select.SelectAlias.SelectAlias<${type}>` : `` - return `${name}?: ${type}${isHasExpanded ? `$Expanded` : ``}${alias}` + const isReference = type !== `$Select.Indicator.NoArgsIndicator` + const typeBareExpanded = `${type}${isHasExpanded ? `$Expanded` : ``}` + const typeReferenced = isReference ? reference(typeBareExpanded) : typeBareExpanded + const aliasType = aliasable ? `| $Select.SelectAlias.SelectAlias<${isReference ? reference(type) : type}>` : `` + return `${name}?: ${typeReferenced}${aliasType}` } /** @@ -412,21 +446,12 @@ namespace Helpers { export const __typenameField = (kind: 'union' | 'interface' | 'object') => { return ` ${__typenameDoc(kind)} - ${outputFieldAlisable(`__typename`, `$Select.Indicator.NoArgsIndicator`)} + ${outputFieldKey(`__typename`, `$Select.Indicator.NoArgsIndicator`)} ` } - const fragmentInlineNameSuffix = `$FragmentInline` - - export const fragmentInlineInterface = ( - node: Grafaid.Schema.ObjectType | Grafaid.Schema.UnionType | Grafaid.Schema.InterfaceType, - ) => { - const name = `${renderName(node)}${fragmentInlineNameSuffix}` - return `export interface ${name} extends ${renderName(node)}, $Select.Directive.$Groups.InlineFragment.Fields {}` - } - export const fragmentInlineField = ( - node: Grafaid.Schema.ObjectType | Grafaid.Schema.UnionType | Grafaid.Schema.InterfaceType, + type: Grafaid.Schema.ObjectType | Grafaid.Schema.UnionType | Grafaid.Schema.InterfaceType, ) => { const doc = Code.TSDoc(` Inline fragments for field groups. @@ -436,14 +461,24 @@ namespace Helpers { @see https://spec.graphql.org/draft/#sec-Inline-Fragments `) - // interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} + // dprint-ignore return ` ${doc} - ___?: ${renderName(node)}${fragmentInlineNameSuffix} | ${renderName(node)}${fragmentInlineNameSuffix}[] + ___?: + | ${H.reference(`${renderName(type)}${fragmentInlineNameSuffix}`)} + | ${H.reference(`${renderName(type)}${fragmentInlineNameSuffix}`)}[] ` } + export const fragmentInlineInterface = ( + node: Grafaid.Schema.ObjectType | Grafaid.Schema.UnionType | Grafaid.Schema.InterfaceType, + ) => { + const name = `${renderName(node)}${fragmentInlineNameSuffix}` + // dprint-ignore + return `export interface ${name}<${$ScalarsTypeParameter}> extends ${renderName(node)}<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {}` + } + const __typenameDoc = (kind: 'union' | 'interface' | 'object') => { const see = `@see https://graphql.org/learn/queries/#meta-fields` if (kind === `object`) { @@ -462,4 +497,6 @@ namespace Helpers { ${see} `) } + + const fragmentInlineNameSuffix = `$FragmentInline` } diff --git a/src/generator/generators/global.ts b/src/generator/generators/global.ts index 67ce85bc8..5d264ca9b 100644 --- a/src/generator/generators/global.ts +++ b/src/generator/generators/global.ts @@ -28,9 +28,6 @@ export const ModuleGeneratorGlobal = createModuleGenerator( ? `\n${Code.TSDoc(config.options.defaultSchemaUrl.href)}` : `` - const customScalarsProperties = config.schema.kindMap.GraphQLScalarTypeCustom - .map((_) => [_.name, `${identifiers.Scalar}.${_.name}`]) - const Clients = Code.termObjectFields({ [config.name]: { name: `Data.Name`, @@ -40,7 +37,6 @@ export const ModuleGeneratorGlobal = createModuleGenerator( Document: `MethodsDocument.BuilderMethodsDocumentFn`, Root: `MethodsRoot.BuilderMethodsRootFn`, }, - customScalars: Object.fromEntries(customScalarsProperties), defaultSchemaUrl: { $TS_DOC: defaultSchemaUrlTsDoc, $VALUE: config.options.defaultSchemaUrl ? `string` : `null`, diff --git a/src/generator/helpers/identifiers.ts b/src/generator/helpers/identifiers.ts index d8cdf6147..76e88e293 100644 --- a/src/generator/helpers/identifiers.ts +++ b/src/generator/helpers/identifiers.ts @@ -1,6 +1,9 @@ export const identifiers = { Schema: `Schema`, - Utilities: `Utilities`, + $SchemaKit: `$SchemaKit`, + $$Utilities: `$$Utilities`, MethodsRoot: `MethodsRoot`, Scalar: `Scalar`, + CustomScalars: `CustomScalars`, + StandardScalar: `StandardScalar`, } diff --git a/src/generator/helpers/render.ts b/src/generator/helpers/render.ts index d79bc1dc4..a5fc67368 100644 --- a/src/generator/helpers/render.ts +++ b/src/generator/helpers/render.ts @@ -118,9 +118,14 @@ export const getDocumentation = (config: Config, node: Grafaid.Schema.Describabl * this guards against GraphQL type or property names that * would be illegal in TypeScript such as `namespace` or `interface`. */ -export const renderName = (type: Grafaid.Schema.NamedTypes | Grafaid.Schema.Field) => { +export const renderName = (type: string | Grafaid.Schema.NamedTypes | Grafaid.Schema.Field) => { + if (typeof type === `string`) { + return type + } + if (Code.reservedTypeScriptInterfaceNames.includes(type.name as any)) { return `$${type.name}` } + return type.name } diff --git a/src/layers/1_Schema/Directives.ts b/src/layers/1_Schema/Directives.ts index 723609b94..7c5cfdf3f 100644 --- a/src/layers/1_Schema/Directives.ts +++ b/src/layers/1_Schema/Directives.ts @@ -4,7 +4,7 @@ export interface Directive { name: string arguments: Record } diff --git a/src/layers/1_Schema/Hybrid/typeGroups.ts b/src/layers/1_Schema/Hybrid/typeGroups.ts index b34d7272e..8344af9f6 100644 --- a/src/layers/1_Schema/Hybrid/typeGroups.ts +++ b/src/layers/1_Schema/Hybrid/typeGroups.ts @@ -1,3 +1,3 @@ import type { Enum, Scalar } from './_.js' -export type $Any = Enum | Scalar.$Any +export type $Any = Enum | Scalar.Scalar diff --git a/src/layers/1_Schema/Hybrid/types/Scalar/Scalar.ts b/src/layers/1_Schema/Hybrid/types/Scalar/Scalar.ts index b3162b0c8..394cb0241 100644 --- a/src/layers/1_Schema/Hybrid/types/Scalar/Scalar.ts +++ b/src/layers/1_Schema/Hybrid/types/Scalar/Scalar.ts @@ -1,16 +1,16 @@ +import type { IsAny, IsNever } from 'type-fest' +import type { Grafaid } from '../../../../../lib/grafaid/__.js' import type { GlobalRegistry } from '../../../../GlobalRegistry.js' import type { Codec, Mapper } from './codec.js' import { JavaScriptScalarCodecs } from './nativeScalarCodecs.js' export { JavaScriptScalarCodecs } from './nativeScalarCodecs.js' -export const ScalarKind = `Scalar` +const ScalarKind = `Scalar` -export type ScalarKind = typeof ScalarKind +type ScalarKind = typeof ScalarKind -export type StandardScalarRuntimeTypes = boolean | number | string - -export const create = <$Name extends string, $Decoded, $Encoded extends StandardScalarRuntimeTypes>( +export const create = <$Name extends string, $Decoded, $Encoded extends Grafaid.Schema.StandardScalarRuntimeTypes>( name: $Name, codec: { encode: (value: $Decoded) => $Encoded @@ -36,16 +36,35 @@ export type GetEncoded<$Scalar> = $Scalar extends Scalar = $Scalar extends Scalar ? $Decoded : never +export interface ScalarCodecless< + $Name extends string = string, +> { + kind: ScalarKind + name: $Name +} + export interface Scalar< $Name extends string = string, $Decoded = unknown, - $Encoded extends StandardScalarRuntimeTypes = StandardScalarRuntimeTypes, + $Encoded extends Grafaid.Schema.StandardScalarRuntimeTypes = Grafaid.Schema.StandardScalarRuntimeTypes, > { kind: ScalarKind name: $Name codec: Codec<$Decoded, $Encoded> } +export type ScalarMap = Record + +// dprint-ignore +export type LookupCustomScalarOrFallbackToString<$Name extends string, $Scalars extends ScalarMap> = + $Name extends keyof $Scalars ? $Scalars[$Name] : String + +export const lookupCustomScalarOrFallbackToString = (scalars: ScalarMap, name: string): Scalar => { + const scalar = scalars[name] + if (scalar) return scalar + return String +} + /** * Apply a codec's mapper function (decode or encode) to a GraphQL value. * @@ -90,22 +109,3 @@ export type Int = typeof Int export type Boolean = typeof Boolean export type Float = typeof Float - -export const Scalars = { - String, - ID, - Int, - Float, - Boolean, -} - -// todo this mixes scalars from different schemas -export type $Any = - | String - | Int - | Boolean - | ID - | Float - | Values - -type Values = T extends any ? keyof T extends never ? never : T[keyof T] : never diff --git a/src/layers/1_Schema/Hybrid/types/Scalar/codec.ts b/src/layers/1_Schema/Hybrid/types/Scalar/codec.ts index 12f0af5dc..803b2a3b9 100644 --- a/src/layers/1_Schema/Hybrid/types/Scalar/codec.ts +++ b/src/layers/1_Schema/Hybrid/types/Scalar/codec.ts @@ -1,11 +1,14 @@ -import type { StandardScalarRuntimeTypes } from './Scalar.js' +import type { Grafaid } from '../../../../../lib/grafaid/__.js' -export type Codec<$Decoded = any, $Encoded extends StandardScalarRuntimeTypes = StandardScalarRuntimeTypes> = { +export type Codec< + $Decoded = any, + $Encoded extends Grafaid.Schema.StandardScalarRuntimeTypes = Grafaid.Schema.StandardScalarRuntimeTypes, +> = { encode: <$$Decoded extends $Decoded>(value: $$Decoded) => $Encoded decode: <$$Encoded extends $Encoded>(value: $$Encoded) => $Decoded } -export const createCodec = <$Decoded, $Encoded extends StandardScalarRuntimeTypes>(codec: { +export const createCodec = <$Decoded, $Encoded extends Grafaid.Schema.StandardScalarRuntimeTypes>(codec: { encode: (value: $Decoded) => $Encoded decode: (value: $Encoded) => $Decoded }): Codec<$Decoded, $Encoded> => codec diff --git a/src/layers/1_Schema/Input/typeGroups.ts b/src/layers/1_Schema/Input/typeGroups.ts index c6e86ab1c..0ca9a37e8 100644 --- a/src/layers/1_Schema/Input/typeGroups.ts +++ b/src/layers/1_Schema/Input/typeGroups.ts @@ -3,7 +3,7 @@ import type { InputObject } from './types/InputObject.js' import type { List } from './types/List.js' import type { Nullable } from './types/Nullable.js' -export type Named = Hybrid.Enum | Hybrid.Scalar.$Any | InputObject +export type Named = Hybrid.Enum | Hybrid.Scalar.Scalar | InputObject | Hybrid.Scalar.ScalarCodecless export type Any = AnyExceptNull | Nullable diff --git a/src/layers/1_Schema/Output/typeGroups.ts b/src/layers/1_Schema/Output/typeGroups.ts index 89e0fa5c5..63f756c0e 100644 --- a/src/layers/1_Schema/Output/typeGroups.ts +++ b/src/layers/1_Schema/Output/typeGroups.ts @@ -9,7 +9,13 @@ import type { Union } from './types/Union.js' export type ObjectLike = Object$2 | Interface -export type Named = Interface | Enum | Object$2 | Union | Hybrid.Scalar.$Any +export type Named = + | Interface + | Enum + | Object$2 + | Union + | Hybrid.Scalar.Scalar + | Hybrid.Scalar.ScalarCodecless export type Unnamed = List | Nullable diff --git a/src/layers/1_Schema/Output/types/Field.ts b/src/layers/1_Schema/Output/types/Field.ts index 3a5236e61..72a75fddb 100644 --- a/src/layers/1_Schema/Output/types/Field.ts +++ b/src/layers/1_Schema/Output/types/Field.ts @@ -12,7 +12,8 @@ export type Field<$Name extends string, $Type extends Output.Any, $Args extends type FieldType = | Hybrid.Enum - | Hybrid.Scalar.$Any + | Hybrid.Scalar.Scalar + | Hybrid.Scalar.ScalarCodecless // | Output.__typename | Output.List | Output.Nullable diff --git a/src/layers/3_InferResult/Field.ts b/src/layers/3_InferResult/Field.ts index 619e3134d..735ece6fa 100644 --- a/src/layers/3_InferResult/Field.ts +++ b/src/layers/3_InferResult/Field.ts @@ -29,11 +29,21 @@ type FieldType< $Type extends SchemaKit.Output.Nullable ? null | FieldType<$SelectionSet, $InnerType, $Schema> : $Type extends SchemaKit.Output.List ? Array> : $Type extends SchemaKit.Enum ? $Members[number] : - $Type extends SchemaKit.Scalar.$Any ? ReturnType<$Type['codec']['decode']> : + $Type extends SchemaKit.Scalar.Scalar ? ReturnType<$Type['codec']['decode']> : + $Type extends SchemaKit.Scalar.ScalarCodecless ? ReturnType['codec']['decode']> : $Type extends SchemaKit.Object$2 ? Object<$SelectionSet, $Schema, $Type> : $Type extends SchemaKit.Interface ? Interface<$SelectionSet, $Schema, $Type> : $Type extends SchemaKit.Union ? Union<$SelectionSet, $Schema, $Type> : - TSErrorDescriptive<'FieldType', `Unknown type`, { $Type: $Type; $SelectionSet: $SelectionSet; $Schema:$Schema }> + TSErrorDescriptive<'FieldType', `Unknown type`, { $Type: $Type; $SelectionSet: $SelectionSet; $Schema:$Schema }> + +// dprint-ignore +type GetCodecForCodecless< + $Type extends SchemaKit.Scalar.ScalarCodecless, + $Schema extends Schema +> = + $Type['name'] extends keyof $Schema['scalars'] + ? $Schema['scalars'][$Type['name']] + : SchemaKit.Scalar.String // dprint-ignore type FieldDirectiveInclude<$SelectionSet> = diff --git a/src/layers/3_InferResult/ScalarsWildcard.ts b/src/layers/3_InferResult/ScalarsWildcard.ts index e78e0d8d4..da530c107 100644 --- a/src/layers/3_InferResult/ScalarsWildcard.ts +++ b/src/layers/3_InferResult/ScalarsWildcard.ts @@ -14,8 +14,14 @@ export type ScalarsWildcard< type PickScalarFields<$Object extends SchemaKit.Output.Object$2> = { [ $Key in keyof $Object['fields'] - as SchemaKit.Output.UnwrapToNamed<$Object['fields'][$Key]['type']> extends SchemaKit.Hybrid.Scalar.$Any | SchemaKit.Output.__typename + as SchemaKit.Output.UnwrapToNamed<$Object['fields'][$Key]['type']> extends ScalarLikeNode ? $Key : never ]: $Object['fields'][$Key] } + +type ScalarLikeNode = + | SchemaKit.Hybrid.Scalar.ScalarCodecless + | SchemaKit.Hybrid.Scalar.Scalar + | SchemaKit.Output.__typename + | SchemaKit.Hybrid.Enum diff --git a/src/layers/3_InferResult/__.test-d.ts b/src/layers/3_InferResult/__.test-d.ts index 1a9666a3e..13ef1491f 100644 --- a/src/layers/3_InferResult/__.test-d.ts +++ b/src/layers/3_InferResult/__.test-d.ts @@ -1,3 +1,5 @@ +import type { Date } 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/SelectionSets.js' import { assertEqual } from '../../lib/assert-equal.js' @@ -6,6 +8,11 @@ import type { PickSelectsPositiveIndicatorAndNotSelectAlias } from './Object.js' type $<$SelectionSet extends SelectionSets.Query> = InferResult.Query<$SelectionSet, Schema> +type $WithDate<$SelectionSet extends SelectionSets.Query<{ Date: typeof Date }>> = InferResult.Query< + $SelectionSet, + Schema<{ Date: typeof Date }> +> + // dprint-ignore { @@ -30,7 +37,8 @@ assertEqual<$<{ id: true; string: false }>, { id: null | string }>() assertEqual<$<{ id: true; string: undefined }>, { id: null | string }>() // Custom Scalar -assertEqual<$<{ date: true }>, { date: null | Date }>() +assertEqual<$<{ date: true }>, { date: null | string }>() +assertEqual<$WithDate<{ date: true }>, { date: null | Date }>() // List assertEqual<$<{ listIntNonNull: true }>, { listIntNonNull: number[] }>() @@ -49,7 +57,7 @@ assertEqual<$<{ objectNonNull: { id: true } }>, { objectNonNull: { id: string | assertEqual<$<{ objectWithArgs: { $: { id: 'abc' }; id: true }}>, { objectWithArgs: null | { id: string | null } }>() // scalars-wildcard -assertEqual<$<{ objectNonNull: { $scalars: true } }>, { objectNonNull: { __typename: "Object1"; string: null|string; int: null|number; float: null|number; boolean: null|boolean; id: null|string } }>() +assertEqual<$<{ objectNonNull: { $scalars: true } }>, { objectNonNull: { __typename: "Object1"; string: null|string; int: null|number; float: null|number; boolean: null|boolean; id: null|string; ABCEnum: null|db.ABCEnum } }>() // scalars-wildcard with nested object assertEqual<$<{ objectNested: { $scalars: true } }>, { objectNested: null | { __typename: "ObjectNested"; id: null|string } }>() // __typename diff --git a/src/layers/3_SelectGraphQLMapper/__snapshots__/toGraphQL.test.ts.snap b/src/layers/3_SelectGraphQLMapper/__snapshots__/toGraphQL.test.ts.snap index b1785168b..d0b0ba9c4 100644 --- a/src/layers/3_SelectGraphQLMapper/__snapshots__/toGraphQL.test.ts.snap +++ b/src/layers/3_SelectGraphQLMapper/__snapshots__/toGraphQL.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`( variables: false ) - Query - $include (empty object) > $include (empty object) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $include (empty object) > $include (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -23,7 +23,7 @@ exports[`( variables: false ) - Query - $include (empty object) > $include (empt " `; -exports[`( variables: false ) - Query - $include (false) > $include (false) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $include (false) > $include (false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -46,7 +46,7 @@ exports[`( variables: false ) - Query - $include (false) > $include (false) 1`] " `; -exports[`( variables: false ) - Query - $include (if false) > $include (if false) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $include (if false) > $include (if false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -71,7 +71,7 @@ exports[`( variables: false ) - Query - $include (if false) > $include (if false " `; -exports[`( variables: false ) - Query - $include (if true) > $include (if true) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $include (if true) > $include (if true) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -96,7 +96,7 @@ exports[`( variables: false ) - Query - $include (if true) > $include (if true) " `; -exports[`( variables: false ) - Query - $include (if undefined) > $include (if undefined) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $include (if undefined) > $include (if undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -119,7 +119,7 @@ exports[`( variables: false ) - Query - $include (if undefined) > $include (if u " `; -exports[`( variables: false ) - Query - $include (undefined) > $include (undefined) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $include (undefined) > $include (undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -141,7 +141,7 @@ exports[`( variables: false ) - Query - $include (undefined) > $include (undefin " `; -exports[`( variables: false ) - Query - $include > $include 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $include > $include 1`] = ` " --------------GRAFFLE QUERY------------- @@ -164,7 +164,7 @@ exports[`( variables: false ) - Query - $include > $include 1`] = ` " `; -exports[`( variables: false ) - Query - $skip (empty object) > $skip (empty object) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $skip (empty object) > $skip (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -187,7 +187,7 @@ exports[`( variables: false ) - Query - $skip (empty object) > $skip (empty obje " `; -exports[`( variables: false ) - Query - $skip (false) > $skip (false) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $skip (false) > $skip (false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -210,7 +210,7 @@ exports[`( variables: false ) - Query - $skip (false) > $skip (false) 1`] = ` " `; -exports[`( variables: false ) - Query - $skip (if false) > $skip (if false) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $skip (if false) > $skip (if false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -235,7 +235,7 @@ exports[`( variables: false ) - Query - $skip (if false) > $skip (if false) 1`] " `; -exports[`( variables: false ) - Query - $skip (if true) > $skip (if true) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $skip (if true) > $skip (if true) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -260,7 +260,7 @@ exports[`( variables: false ) - Query - $skip (if true) > $skip (if true) 1`] = " `; -exports[`( variables: false ) - Query - $skip (if undefined) > $skip (if undefined) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $skip (if undefined) > $skip (if undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -283,7 +283,7 @@ exports[`( variables: false ) - Query - $skip (if undefined) > $skip (if undefin " `; -exports[`( variables: false ) - Query - $skip (true) > $skip (true) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $skip (true) > $skip (true) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -306,7 +306,7 @@ exports[`( variables: false ) - Query - $skip (true) > $skip (true) 1`] = ` " `; -exports[`( variables: false ) - Query - $skip (undefined) > $skip (undefined) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - $skip (undefined) > $skip (undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -328,7 +328,7 @@ exports[`( variables: false ) - Query - $skip (undefined) > $skip (undefined) 1` " `; -exports[`( variables: false ) - Query - alias - scalar > alias - scalar 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - alias - scalar > alias - scalar 1`] = ` " --------------GRAFFLE QUERY------------- @@ -349,7 +349,7 @@ exports[`( variables: false ) - Query - alias - scalar > alias - scalar 1`] = ` " `; -exports[`( variables: false ) - Query - alias - scalar directive > alias - scalar directive 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - alias - scalar directive > alias - scalar directive 1`] = ` " --------------GRAFFLE QUERY------------- @@ -372,7 +372,7 @@ exports[`( variables: false ) - Query - alias - scalar directive > alias - scala " `; -exports[`( variables: false ) - Query - alias - scalar directive+select > alias - scalar directive+select 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - alias - scalar directive+select > alias - scalar directive+select 1`] = ` " --------------GRAFFLE QUERY------------- @@ -398,7 +398,7 @@ exports[`( variables: false ) - Query - alias - scalar directive+select > alias " `; -exports[`( variables: false ) - Query - alias - scalar x2 > alias - scalar x2 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - alias - scalar x2 > alias - scalar x2 1`] = ` " --------------GRAFFLE QUERY------------- @@ -426,7 +426,7 @@ exports[`( variables: false ) - Query - alias - scalar x2 > alias - scalar x2 1` " `; -exports[`( variables: false ) - Query - args - alias > args - alias 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - alias > args - alias 1`] = ` " --------------GRAFFLE QUERY------------- @@ -453,20 +453,20 @@ exports[`( variables: false ) - Query - args - alias > args - alias 1`] = ` " `; -exports[`( variables: false ) - Query - args - custom scalar - arg field > args - custom scalar - arg field 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - arg field > args - custom scalar - arg field 1`] = ` " --------------GRAFFLE QUERY------------- { "dateArg": { "$": { - "date": "1970-01-01T00:00:00.000Z" + "date": "0" } } } --------GRAPHQL DOCUMENT & VARIABLES-------- { - dateArg(date: "1970-01-01T00:00:00.000Z") + dateArg(date: "0") } ---------------- { @@ -475,7 +475,7 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field > args " `; -exports[`( variables: false ) - Query - args - custom scalar - arg field in list (null) > args - custom scalar - arg field in list (null) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - arg field in list (null) > args - custom scalar - arg field in list (null) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -497,7 +497,7 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in list " `; -exports[`( variables: false ) - Query - args - custom scalar - arg field in list > args - custom scalar - arg field in list 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - arg field in list > args - custom scalar - arg field in list 1`] = ` " --------------GRAFFLE QUERY------------- @@ -505,15 +505,15 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in list "dateArgList": { "$": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } } --------GRAPHQL DOCUMENT & VARIABLES-------- { - dateArgList(date: ["1970-01-01T00:00:00.000Z", "1970-01-01T00:00:00.001Z"]) + dateArgList(date: ["0", "1"]) } ---------------- { @@ -522,20 +522,20 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in list " `; -exports[`( variables: false ) - Query - args - custom scalar - arg field in non-null > args - custom scalar - arg field in non-null 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - arg field in non-null > args - custom scalar - arg field in non-null 1`] = ` " --------------GRAFFLE QUERY------------- { "dateArgNonNull": { "$": { - "date": "1970-01-01T00:00:00.000Z" + "date": "0" } } } --------GRAPHQL DOCUMENT & VARIABLES-------- { - dateArgNonNull(date: "1970-01-01T00:00:00.000Z") + dateArgNonNull(date: "0") } ---------------- { @@ -544,7 +544,7 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in non- " `; -exports[`( variables: false ) - Query - args - custom scalar - arg field in non-null list (with list) > args - custom scalar - arg field in non-null list (with list) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - arg field in non-null list (with list) > args - custom scalar - arg field in non-null list (with list) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -552,17 +552,15 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in non- "dateArgNonNullList": { "$": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } } --------GRAPHQL DOCUMENT & VARIABLES-------- { - dateArgNonNullList( - date: ["1970-01-01T00:00:00.000Z", "1970-01-01T00:00:00.001Z"] - ) + dateArgNonNullList(date: ["0", "1"]) } ---------------- { @@ -571,7 +569,7 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in non- " `; -exports[`( variables: false ) - Query - args - custom scalar - arg field in non-null list (with null) > args - custom scalar - arg field in non-null list (with null) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - arg field in non-null list (with null) > args - custom scalar - arg field in non-null list (with null) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -580,14 +578,14 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in non- "$": { "date": [ null, - "1970-01-01T00:00:00.000Z" + "0" ] } } } --------GRAPHQL DOCUMENT & VARIABLES-------- { - dateArgNonNullList(date: [null, "1970-01-01T00:00:00.000Z"]) + dateArgNonNullList(date: [null, "0"]) } ---------------- { @@ -596,7 +594,7 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in non- " `; -exports[`( variables: false ) - Query - args - custom scalar - arg field in non-null list non-null > args - custom scalar - arg field in non-null list non-null 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - arg field in non-null list non-null > args - custom scalar - arg field in non-null list non-null 1`] = ` " --------------GRAFFLE QUERY------------- @@ -604,17 +602,15 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in non- "dateArgNonNullListNonNull": { "$": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } } --------GRAPHQL DOCUMENT & VARIABLES-------- { - dateArgNonNullListNonNull( - date: ["1970-01-01T00:00:00.000Z", "1970-01-01T00:00:00.001Z"] - ) + dateArgNonNullListNonNull(date: ["0", "1"]) } ---------------- { @@ -623,7 +619,7 @@ exports[`( variables: false ) - Query - args - custom scalar - arg field in non- " `; -exports[`( variables: false ) - Query - args - custom scalar - input object field > args - custom scalar - input object field 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - input object field > args - custom scalar - input object field 1`] = ` " --------------GRAFFLE QUERY------------- @@ -632,17 +628,15 @@ exports[`( variables: false ) - Query - args - custom scalar - input object fiel "$": { "input": { "idRequired": "", - "dateRequired": "1970-01-01T00:00:00.000Z", - "date": "1970-01-01T00:00:00.001Z" + "dateRequired": "0", + "date": "1" } } } } --------GRAPHQL DOCUMENT & VARIABLES-------- { - dateArgInputObject( - input: {idRequired: "", dateRequired: "1970-01-01T00:00:00.000Z", date: "1970-01-01T00:00:00.001Z"} - ) + dateArgInputObject(input: {idRequired: "", dateRequired: "0", date: "1"}) } ---------------- { @@ -651,7 +645,7 @@ exports[`( variables: false ) - Query - args - custom scalar - input object fiel " `; -exports[`( variables: false ) - Query - args - custom scalar - nested input object field > args - custom scalar - nested input object field 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - custom scalar - nested input object field > args - custom scalar - nested input object field 1`] = ` " --------------GRAFFLE QUERY------------- @@ -661,8 +655,8 @@ exports[`( variables: false ) - Query - args - custom scalar - nested input obje "input": { "InputObject": { "idRequired": "", - "dateRequired": "1970-01-01T00:00:00.000Z", - "date": "1970-01-01T00:00:00.001Z" + "dateRequired": "0", + "date": "1" } } } @@ -671,7 +665,7 @@ exports[`( variables: false ) - Query - args - custom scalar - nested input obje --------GRAPHQL DOCUMENT & VARIABLES-------- { InputObjectNested( - input: {InputObject: {idRequired: "", dateRequired: "1970-01-01T00:00:00.000Z", date: "1970-01-01T00:00:00.001Z"}} + input: {InputObject: {idRequired: "", dateRequired: "0", date: "1"}} ) } ---------------- @@ -681,7 +675,7 @@ exports[`( variables: false ) - Query - args - custom scalar - nested input obje " `; -exports[`( variables: false ) - Query - args - object with args (empty object) > args - object with args (empty object) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - object with args (empty object) > args - object with args (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -704,7 +698,7 @@ exports[`( variables: false ) - Query - args - object with args (empty object) > " `; -exports[`( variables: false ) - Query - args - object with args > args - object with args 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - object with args > args - object with args 1`] = ` " --------------GRAFFLE QUERY------------- @@ -729,7 +723,7 @@ exports[`( variables: false ) - Query - args - object with args > args - object " `; -exports[`( variables: false ) - Query - args - on union > args - on union 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - on union > args - on union 1`] = ` " --------------GRAFFLE QUERY------------- @@ -754,7 +748,7 @@ exports[`( variables: false ) - Query - args - on union > args - on union 1`] = " `; -exports[`( variables: false ) - Query - args - string with args (empty object) > args - string with args (empty object) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - string with args (empty object) > args - string with args (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -774,7 +768,7 @@ exports[`( variables: false ) - Query - args - string with args (empty object) > " `; -exports[`( variables: false ) - Query - args - string with args > args - string with args 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - string with args > args - string with args 1`] = ` " --------------GRAFFLE QUERY------------- @@ -797,7 +791,7 @@ exports[`( variables: false ) - Query - args - string with args > args - string " `; -exports[`( variables: false ) - Query - args - x2 same > args - x2 same 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - args - x2 same > args - x2 same 1`] = ` " --------------GRAFFLE QUERY------------- @@ -833,7 +827,7 @@ exports[`( variables: false ) - Query - args - x2 same > args - x2 same 1`] = ` " `; -exports[`( variables: false ) - Query - custom operation name > custom operation name 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - custom operation name > custom operation name 1`] = ` " --------------GRAFFLE QUERY------------- @@ -851,7 +845,7 @@ query foobar { " `; -exports[`( variables: false ) - Query - fg - directive > fg - directive 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - fg - directive > fg - directive 1`] = ` " --------------GRAFFLE QUERY------------- @@ -874,7 +868,7 @@ exports[`( variables: false ) - Query - fg - directive > fg - directive 1`] = ` " `; -exports[`( variables: false ) - Query - fg - in union > fg - in union 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - fg - in union > fg - in union 1`] = ` " --------------GRAFFLE QUERY------------- @@ -900,7 +894,7 @@ exports[`( variables: false ) - Query - fg - in union > fg - in union 1`] = ` " `; -exports[`( variables: false ) - Query - fg - interface > fg - interface 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - fg - interface > fg - interface 1`] = ` " --------------GRAFFLE QUERY------------- @@ -926,7 +920,7 @@ exports[`( variables: false ) - Query - fg - interface > fg - interface 1`] = ` " `; -exports[`( variables: false ) - Query - fg - multiple > fg - multiple 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - fg - multiple > fg - multiple 1`] = ` " --------------GRAFFLE QUERY------------- @@ -956,7 +950,7 @@ exports[`( variables: false ) - Query - fg - multiple > fg - multiple 1`] = ` " `; -exports[`( variables: false ) - Query - fg - one > fg - one 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - fg - one > fg - one 1`] = ` " --------------GRAFFLE QUERY------------- @@ -978,7 +972,7 @@ exports[`( variables: false ) - Query - fg - one > fg - one 1`] = ` " `; -exports[`( variables: false ) - Query - id string false > id string false 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - id string false > id string false 1`] = ` " --------------GRAFFLE QUERY------------- @@ -997,7 +991,7 @@ exports[`( variables: false ) - Query - id string false > id string false 1`] = " `; -exports[`( variables: false ) - Query - id string undefined > id string undefined 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - id string undefined > id string undefined 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1015,7 +1009,7 @@ exports[`( variables: false ) - Query - id string undefined > id string undefine " `; -exports[`( variables: false ) - Query - object nested > object nested 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - object nested > object nested 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1044,7 +1038,7 @@ exports[`( variables: false ) - Query - object nested > object nested 1`] = ` " `; -exports[`( variables: false ) - Query - object nested scalar $skip > object nested scalar $skip 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - object nested scalar $skip > object nested scalar $skip 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1076,7 +1070,7 @@ exports[`( variables: false ) - Query - object nested scalar $skip > object nest " `; -exports[`( variables: false ) - Query - object scalar > object scalar 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - object scalar > object scalar 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1098,7 +1092,7 @@ exports[`( variables: false ) - Query - object scalar > object scalar 1`] = ` " `; -exports[`( variables: false ) - Query - other > other 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - other > other 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1116,7 +1110,7 @@ exports[`( variables: false ) - Query - other > other 1`] = ` " `; -exports[`( variables: false ) - Query - string > string 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - string > string 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1134,7 +1128,7 @@ exports[`( variables: false ) - Query - string > string 1`] = ` " `; -exports[`( variables: false ) - Query - union - __typename (no fragment) > union - __typename (no fragment) 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - union - __typename (no fragment) > union - __typename (no fragment) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1156,7 +1150,7 @@ exports[`( variables: false ) - Query - union - __typename (no fragment) > union " `; -exports[`( variables: false ) - Query - union - directive > union - directive 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - union - directive > union - directive 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1183,7 +1177,7 @@ exports[`( variables: false ) - Query - union - directive > union - directive 1` " `; -exports[`( variables: false ) - Query - union - scalar > union - scalar 1`] = ` +exports[`( variables: false; scalars: (none) ) - Query - union - scalar > union - scalar 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1209,7 +1203,229 @@ exports[`( variables: false ) - Query - union - scalar > union - scalar 1`] = ` " `; -exports[`( variables: true ) - Query - $include (empty object) > $include (empty object) 1`] = ` +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - arg field > args - custom scalar - arg field 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArg": { + "$": { + "date": "1970-01-01T00:00:00.000Z" + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArg(date: {}) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - arg field in list (null) > args - custom scalar - arg field in list (null) 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgList": { + "$": { + "date": null + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArgList(date: null) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - arg field in list > args - custom scalar - arg field in list 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgList": { + "$": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArgList(date: [{}, {}]) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - arg field in non-null > args - custom scalar - arg field in non-null 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNull": { + "$": { + "date": "1970-01-01T00:00:00.000Z" + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArgNonNull(date: {}) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - arg field in non-null list (with list) > args - custom scalar - arg field in non-null list (with list) 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNullList": { + "$": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArgNonNullList(date: [{}, {}]) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - arg field in non-null list (with null) > args - custom scalar - arg field in non-null list (with null) 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNullList": { + "$": { + "date": [ + null, + "1970-01-01T00:00:00.000Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArgNonNullList(date: [null, {}]) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - arg field in non-null list non-null > args - custom scalar - arg field in non-null list non-null 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNullListNonNull": { + "$": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArgNonNullListNonNull(date: [{}, {}]) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - input object field > args - custom scalar - input object field 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgInputObject": { + "$": { + "input": { + "idRequired": "", + "dateRequired": "1970-01-01T00:00:00.000Z", + "date": "1970-01-01T00:00:00.001Z" + } + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + dateArgInputObject(input: {idRequired: "", dateRequired: {}, date: {}}) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: false; scalars: Date ) - Query - args - custom scalar - nested input object field > args - custom scalar - nested input object field 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "InputObjectNested": { + "$": { + "input": { + "InputObject": { + "idRequired": "", + "dateRequired": "1970-01-01T00:00:00.000Z", + "date": "1970-01-01T00:00:00.001Z" + } + } + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +{ + InputObjectNested( + input: {InputObject: {idRequired: "", dateRequired: {}, date: {}}} + ) +} +---------------- +{ + "$default": {} +} +" +`; + +exports[`( variables: true; scalars: (none) ) - Query - $include (empty object) > $include (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1232,7 +1448,7 @@ exports[`( variables: true ) - Query - $include (empty object) > $include (empty " `; -exports[`( variables: true ) - Query - $include (false) > $include (false) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $include (false) > $include (false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1255,7 +1471,7 @@ exports[`( variables: true ) - Query - $include (false) > $include (false) 1`] = " `; -exports[`( variables: true ) - Query - $include (if false) > $include (if false) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $include (if false) > $include (if false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1280,7 +1496,7 @@ exports[`( variables: true ) - Query - $include (if false) > $include (if false) " `; -exports[`( variables: true ) - Query - $include (if true) > $include (if true) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $include (if true) > $include (if true) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1305,7 +1521,7 @@ exports[`( variables: true ) - Query - $include (if true) > $include (if true) 1 " `; -exports[`( variables: true ) - Query - $include (if undefined) > $include (if undefined) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $include (if undefined) > $include (if undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1328,7 +1544,7 @@ exports[`( variables: true ) - Query - $include (if undefined) > $include (if un " `; -exports[`( variables: true ) - Query - $include (undefined) > $include (undefined) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $include (undefined) > $include (undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1350,7 +1566,7 @@ exports[`( variables: true ) - Query - $include (undefined) > $include (undefine " `; -exports[`( variables: true ) - Query - $include > $include 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $include > $include 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1373,7 +1589,7 @@ exports[`( variables: true ) - Query - $include > $include 1`] = ` " `; -exports[`( variables: true ) - Query - $skip (empty object) > $skip (empty object) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $skip (empty object) > $skip (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1396,7 +1612,7 @@ exports[`( variables: true ) - Query - $skip (empty object) > $skip (empty objec " `; -exports[`( variables: true ) - Query - $skip (false) > $skip (false) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $skip (false) > $skip (false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1419,7 +1635,7 @@ exports[`( variables: true ) - Query - $skip (false) > $skip (false) 1`] = ` " `; -exports[`( variables: true ) - Query - $skip (if false) > $skip (if false) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $skip (if false) > $skip (if false) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1444,7 +1660,7 @@ exports[`( variables: true ) - Query - $skip (if false) > $skip (if false) 1`] = " `; -exports[`( variables: true ) - Query - $skip (if true) > $skip (if true) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $skip (if true) > $skip (if true) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1469,7 +1685,7 @@ exports[`( variables: true ) - Query - $skip (if true) > $skip (if true) 1`] = ` " `; -exports[`( variables: true ) - Query - $skip (if undefined) > $skip (if undefined) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $skip (if undefined) > $skip (if undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1492,7 +1708,7 @@ exports[`( variables: true ) - Query - $skip (if undefined) > $skip (if undefine " `; -exports[`( variables: true ) - Query - $skip (true) > $skip (true) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $skip (true) > $skip (true) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1515,7 +1731,7 @@ exports[`( variables: true ) - Query - $skip (true) > $skip (true) 1`] = ` " `; -exports[`( variables: true ) - Query - $skip (undefined) > $skip (undefined) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - $skip (undefined) > $skip (undefined) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1537,7 +1753,7 @@ exports[`( variables: true ) - Query - $skip (undefined) > $skip (undefined) 1`] " `; -exports[`( variables: true ) - Query - alias - scalar > alias - scalar 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - alias - scalar > alias - scalar 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1558,7 +1774,7 @@ exports[`( variables: true ) - Query - alias - scalar > alias - scalar 1`] = ` " `; -exports[`( variables: true ) - Query - alias - scalar directive > alias - scalar directive 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - alias - scalar directive > alias - scalar directive 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1581,7 +1797,7 @@ exports[`( variables: true ) - Query - alias - scalar directive > alias - scalar " `; -exports[`( variables: true ) - Query - alias - scalar directive+select > alias - scalar directive+select 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - alias - scalar directive+select > alias - scalar directive+select 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1607,7 +1823,7 @@ exports[`( variables: true ) - Query - alias - scalar directive+select > alias - " `; -exports[`( variables: true ) - Query - alias - scalar x2 > alias - scalar x2 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - alias - scalar x2 > alias - scalar x2 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1635,7 +1851,7 @@ exports[`( variables: true ) - Query - alias - scalar x2 > alias - scalar x2 1`] " `; -exports[`( variables: true ) - Query - args - alias > args - alias 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - alias > args - alias 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1664,14 +1880,14 @@ query ($id: ID) { " `; -exports[`( variables: true ) - Query - args - custom scalar - arg field > args - custom scalar - arg field 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - arg field > args - custom scalar - arg field 1`] = ` " --------------GRAFFLE QUERY------------- { "dateArg": { "$": { - "date": "1970-01-01T00:00:00.000Z" + "date": "0" } } } @@ -1682,13 +1898,13 @@ query ($date: Date) { ---------------- { "$default": { - "date": "1970-01-01T00:00:00.000Z" + "date": "0" } } " `; -exports[`( variables: true ) - Query - args - custom scalar - arg field in list (null) > args - custom scalar - arg field in list (null) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - arg field in list (null) > args - custom scalar - arg field in list (null) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1712,7 +1928,7 @@ query ($date: [Date!]) { " `; -exports[`( variables: true ) - Query - args - custom scalar - arg field in list > args - custom scalar - arg field in list 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - arg field in list > args - custom scalar - arg field in list 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1720,8 +1936,8 @@ exports[`( variables: true ) - Query - args - custom scalar - arg field in list "dateArgList": { "$": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } @@ -1734,22 +1950,22 @@ query ($date: [Date!]) { { "$default": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } " `; -exports[`( variables: true ) - Query - args - custom scalar - arg field in non-null > args - custom scalar - arg field in non-null 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - arg field in non-null > args - custom scalar - arg field in non-null 1`] = ` " --------------GRAFFLE QUERY------------- { "dateArgNonNull": { "$": { - "date": "1970-01-01T00:00:00.000Z" + "date": "0" } } } @@ -1760,13 +1976,13 @@ query ($date: Date!) { ---------------- { "$default": { - "date": "1970-01-01T00:00:00.000Z" + "date": "0" } } " `; -exports[`( variables: true ) - Query - args - custom scalar - arg field in non-null list (with list) > args - custom scalar - arg field in non-null list (with list) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - arg field in non-null list (with list) > args - custom scalar - arg field in non-null list (with list) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1774,8 +1990,8 @@ exports[`( variables: true ) - Query - args - custom scalar - arg field in non-n "dateArgNonNullList": { "$": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } @@ -1788,15 +2004,15 @@ query ($date: [Date]!) { { "$default": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } " `; -exports[`( variables: true ) - Query - args - custom scalar - arg field in non-null list (with null) > args - custom scalar - arg field in non-null list (with null) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - arg field in non-null list (with null) > args - custom scalar - arg field in non-null list (with null) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1805,7 +2021,7 @@ exports[`( variables: true ) - Query - args - custom scalar - arg field in non-n "$": { "date": [ null, - "1970-01-01T00:00:00.000Z" + "0" ] } } @@ -1819,14 +2035,14 @@ query ($date: [Date]!) { "$default": { "date": [ null, - "1970-01-01T00:00:00.000Z" + "0" ] } } " `; -exports[`( variables: true ) - Query - args - custom scalar - arg field in non-null list non-null > args - custom scalar - arg field in non-null list non-null 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - arg field in non-null list non-null > args - custom scalar - arg field in non-null list non-null 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1834,8 +2050,8 @@ exports[`( variables: true ) - Query - args - custom scalar - arg field in non-n "dateArgNonNullListNonNull": { "$": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } @@ -1848,15 +2064,15 @@ query ($date: [Date!]!) { { "$default": { "date": [ - "1970-01-01T00:00:00.000Z", - "1970-01-01T00:00:00.001Z" + "0", + "1" ] } } " `; -exports[`( variables: true ) - Query - args - custom scalar - input object field > args - custom scalar - input object field 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - input object field > args - custom scalar - input object field 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1865,8 +2081,8 @@ exports[`( variables: true ) - Query - args - custom scalar - input object field "$": { "input": { "idRequired": "", - "dateRequired": "1970-01-01T00:00:00.000Z", - "date": "1970-01-01T00:00:00.001Z" + "dateRequired": "0", + "date": "1" } } } @@ -1880,15 +2096,15 @@ query ($input: InputObject) { "$default": { "input": { "idRequired": "", - "dateRequired": "1970-01-01T00:00:00.000Z", - "date": "1970-01-01T00:00:00.001Z" + "dateRequired": "0", + "date": "1" } } } " `; -exports[`( variables: true ) - Query - args - custom scalar - nested input object field > args - custom scalar - nested input object field 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - custom scalar - nested input object field > args - custom scalar - nested input object field 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1898,8 +2114,8 @@ exports[`( variables: true ) - Query - args - custom scalar - nested input objec "input": { "InputObject": { "idRequired": "", - "dateRequired": "1970-01-01T00:00:00.000Z", - "date": "1970-01-01T00:00:00.001Z" + "dateRequired": "0", + "date": "1" } } } @@ -1915,8 +2131,8 @@ query ($input: InputObjectNested) { "input": { "InputObject": { "idRequired": "", - "dateRequired": "1970-01-01T00:00:00.000Z", - "date": "1970-01-01T00:00:00.001Z" + "dateRequired": "0", + "date": "1" } } } @@ -1924,7 +2140,7 @@ query ($input: InputObjectNested) { " `; -exports[`( variables: true ) - Query - args - object with args (empty object) > args - object with args (empty object) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - object with args (empty object) > args - object with args (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1947,7 +2163,7 @@ exports[`( variables: true ) - Query - args - object with args (empty object) > " `; -exports[`( variables: true ) - Query - args - object with args > args - object with args 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - object with args > args - object with args 1`] = ` " --------------GRAFFLE QUERY------------- @@ -1974,7 +2190,7 @@ query ($id: ID) { " `; -exports[`( variables: true ) - Query - args - on union > args - on union 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - on union > args - on union 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2001,7 +2217,7 @@ query ($case: Case!) { " `; -exports[`( variables: true ) - Query - args - string with args (empty object) > args - string with args (empty object) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - string with args (empty object) > args - string with args (empty object) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2021,7 +2237,7 @@ exports[`( variables: true ) - Query - args - string with args (empty object) > " `; -exports[`( variables: true ) - Query - args - string with args > args - string with args 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - string with args > args - string with args 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2047,7 +2263,7 @@ query ($boolean: Boolean, $float: Float) { " `; -exports[`( variables: true ) - Query - args - x2 same > args - x2 same 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - args - x2 same > args - x2 same 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2086,7 +2302,7 @@ query ($id: ID, $id_2: ID) { " `; -exports[`( variables: true ) - Query - custom operation name > custom operation name 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - custom operation name > custom operation name 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2104,7 +2320,7 @@ query foobar { " `; -exports[`( variables: true ) - Query - fg - directive > fg - directive 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - fg - directive > fg - directive 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2127,7 +2343,7 @@ exports[`( variables: true ) - Query - fg - directive > fg - directive 1`] = ` " `; -exports[`( variables: true ) - Query - fg - in union > fg - in union 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - fg - in union > fg - in union 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2153,7 +2369,7 @@ exports[`( variables: true ) - Query - fg - in union > fg - in union 1`] = ` " `; -exports[`( variables: true ) - Query - fg - interface > fg - interface 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - fg - interface > fg - interface 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2179,7 +2395,7 @@ exports[`( variables: true ) - Query - fg - interface > fg - interface 1`] = ` " `; -exports[`( variables: true ) - Query - fg - multiple > fg - multiple 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - fg - multiple > fg - multiple 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2209,7 +2425,7 @@ exports[`( variables: true ) - Query - fg - multiple > fg - multiple 1`] = ` " `; -exports[`( variables: true ) - Query - fg - one > fg - one 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - fg - one > fg - one 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2231,7 +2447,7 @@ exports[`( variables: true ) - Query - fg - one > fg - one 1`] = ` " `; -exports[`( variables: true ) - Query - id string false > id string false 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - id string false > id string false 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2250,7 +2466,7 @@ exports[`( variables: true ) - Query - id string false > id string false 1`] = ` " `; -exports[`( variables: true ) - Query - id string undefined > id string undefined 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - id string undefined > id string undefined 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2268,7 +2484,7 @@ exports[`( variables: true ) - Query - id string undefined > id string undefined " `; -exports[`( variables: true ) - Query - object nested > object nested 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - object nested > object nested 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2297,7 +2513,7 @@ exports[`( variables: true ) - Query - object nested > object nested 1`] = ` " `; -exports[`( variables: true ) - Query - object nested scalar $skip > object nested scalar $skip 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - object nested scalar $skip > object nested scalar $skip 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2329,7 +2545,7 @@ exports[`( variables: true ) - Query - object nested scalar $skip > object neste " `; -exports[`( variables: true ) - Query - object scalar > object scalar 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - object scalar > object scalar 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2351,7 +2567,7 @@ exports[`( variables: true ) - Query - object scalar > object scalar 1`] = ` " `; -exports[`( variables: true ) - Query - other > other 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - other > other 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2369,7 +2585,7 @@ exports[`( variables: true ) - Query - other > other 1`] = ` " `; -exports[`( variables: true ) - Query - string > string 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - string > string 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2387,7 +2603,7 @@ exports[`( variables: true ) - Query - string > string 1`] = ` " `; -exports[`( variables: true ) - Query - union - __typename (no fragment) > union - __typename (no fragment) 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - union - __typename (no fragment) > union - __typename (no fragment) 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2409,7 +2625,7 @@ exports[`( variables: true ) - Query - union - __typename (no fragment) > union " `; -exports[`( variables: true ) - Query - union - directive > union - directive 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - union - directive > union - directive 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2436,7 +2652,7 @@ exports[`( variables: true ) - Query - union - directive > union - directive 1`] " `; -exports[`( variables: true ) - Query - union - scalar > union - scalar 1`] = ` +exports[`( variables: true; scalars: (none) ) - Query - union - scalar > union - scalar 1`] = ` " --------------GRAFFLE QUERY------------- @@ -2461,3 +2677,263 @@ exports[`( variables: true ) - Query - union - scalar > union - scalar 1`] = ` } " `; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - arg field > args - custom scalar - arg field 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArg": { + "$": { + "date": "1970-01-01T00:00:00.000Z" + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($date: Date) { + dateArg(date: $date) +} +---------------- +{ + "$default": { + "date": "1970-01-01T00:00:00.000Z" + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - arg field in list (null) > args - custom scalar - arg field in list (null) 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgList": { + "$": { + "date": null + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($date: [Date!]) { + dateArgList(date: $date) +} +---------------- +{ + "$default": { + "date": null + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - arg field in list > args - custom scalar - arg field in list 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgList": { + "$": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($date: [Date!]) { + dateArgList(date: $date) +} +---------------- +{ + "$default": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - arg field in non-null > args - custom scalar - arg field in non-null 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNull": { + "$": { + "date": "1970-01-01T00:00:00.000Z" + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($date: Date!) { + dateArgNonNull(date: $date) +} +---------------- +{ + "$default": { + "date": "1970-01-01T00:00:00.000Z" + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - arg field in non-null list (with list) > args - custom scalar - arg field in non-null list (with list) 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNullList": { + "$": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($date: [Date]!) { + dateArgNonNullList(date: $date) +} +---------------- +{ + "$default": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - arg field in non-null list (with null) > args - custom scalar - arg field in non-null list (with null) 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNullList": { + "$": { + "date": [ + null, + "1970-01-01T00:00:00.000Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($date: [Date]!) { + dateArgNonNullList(date: $date) +} +---------------- +{ + "$default": { + "date": [ + null, + "1970-01-01T00:00:00.000Z" + ] + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - arg field in non-null list non-null > args - custom scalar - arg field in non-null list non-null 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgNonNullListNonNull": { + "$": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($date: [Date!]!) { + dateArgNonNullListNonNull(date: $date) +} +---------------- +{ + "$default": { + "date": [ + "1970-01-01T00:00:00.000Z", + "1970-01-01T00:00:00.001Z" + ] + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - input object field > args - custom scalar - input object field 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "dateArgInputObject": { + "$": { + "input": { + "idRequired": "", + "dateRequired": "1970-01-01T00:00:00.000Z", + "date": "1970-01-01T00:00:00.001Z" + } + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($input: InputObject) { + dateArgInputObject(input: $input) +} +---------------- +{ + "$default": { + "input": { + "idRequired": "", + "dateRequired": "1970-01-01T00:00:00.000Z", + "date": "1970-01-01T00:00:00.001Z" + } + } +} +" +`; + +exports[`( variables: true; scalars: Date ) - Query - args - custom scalar - nested input object field > args - custom scalar - nested input object field 1`] = ` +" + +--------------GRAFFLE QUERY------------- +{ + "InputObjectNested": { + "$": { + "input": { + "InputObject": { + "idRequired": "", + "dateRequired": "1970-01-01T00:00:00.000Z", + "date": "1970-01-01T00:00:00.001Z" + } + } + } + } +} +--------GRAPHQL DOCUMENT & VARIABLES-------- +query ($input: InputObjectNested) { + InputObjectNested(input: $input) +} +---------------- +{ + "$default": { + "input": { + "InputObject": { + "idRequired": "", + "dateRequired": "1970-01-01T00:00:00.000Z", + "date": "1970-01-01T00:00:00.001Z" + } + } + } +} +" +`; diff --git a/src/layers/3_SelectGraphQLMapper/context.ts b/src/layers/3_SelectGraphQLMapper/context.ts index 0a5cc1212..098b45fa1 100644 --- a/src/layers/3_SelectGraphQLMapper/context.ts +++ b/src/layers/3_SelectGraphQLMapper/context.ts @@ -1,11 +1,13 @@ import type { SchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/__.js' import type { Grafaid } from '../../lib/grafaid/__.js' import { Nodes } from '../../lib/grafaid/_Nodes.js' +import type { SchemaKit } from '../1_Schema/__.js' import { inferVariableType } from './inferVariableType.js' import type { Options } from './nodes/1_Document.js' export interface OperationContext { sddm?: SchemaDrivenDataMap + scalars: SchemaKit.Hybrid.Scalar.ScalarMap variables: { /** * Should variables be used for arguments? @@ -33,6 +35,7 @@ export interface Captures { export const createOperationContext = (options?: Options): OperationContext => { const context: OperationContext = { sddm: options?.sddm ?? undefined, + scalars: options?.scalars ?? {}, variables: { enabled: options?.operationVariables ?? true, capture: (input) => { diff --git a/src/layers/3_SelectGraphQLMapper/inferVariableType.ts b/src/layers/3_SelectGraphQLMapper/inferVariableType.ts index f29adbbf8..84a5fb8e1 100644 --- a/src/layers/3_SelectGraphQLMapper/inferVariableType.ts +++ b/src/layers/3_SelectGraphQLMapper/inferVariableType.ts @@ -1,5 +1,4 @@ -import type { SchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/__.js' -import { isScalar } from '../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' +import { SchemaDrivenDataMap } from '../../extensions/CustomScalars/schemaDrivenDataMap/__.js' /** * Infer the type of a variable for the given argument. @@ -24,9 +23,12 @@ const inferTypeInline = (sddmInlineType: undefined | SchemaDrivenDataMap.InlineT } const inferNamedType = (sddmNode: SchemaDrivenDataMap.ArgumentOrInputField): string => { - if (isScalar(sddmNode.nt)) { + if (SchemaDrivenDataMap.isScalar(sddmNode.nt)) { return sddmNode.nt.name } + if (SchemaDrivenDataMap.isCustomScalarName(sddmNode.nt)) { + return sddmNode.nt + } if (sddmNode.nt?.n) { return sddmNode.nt.n diff --git a/src/layers/3_SelectGraphQLMapper/nodes/1_Document.ts b/src/layers/3_SelectGraphQLMapper/nodes/1_Document.ts index 9e42f0f0f..ed26086e4 100644 --- a/src/layers/3_SelectGraphQLMapper/nodes/1_Document.ts +++ b/src/layers/3_SelectGraphQLMapper/nodes/1_Document.ts @@ -1,4 +1,4 @@ -import type { SchemaDrivenDataMap } from '../../../entrypoints/utilities-for-generated.js' +import type { SchemaDrivenDataMap, SchemaKit } from '../../../entrypoints/utilities-for-generated.js' import type { Grafaid } from '../../../lib/grafaid/__.js' import { Nodes } from '../../../lib/grafaid/_Nodes.js' import type { Select } from '../../2_Select/__.js' @@ -34,6 +34,7 @@ export const toGraphQLDocument = ( export interface Options { sddm?: SchemaDrivenDataMap | null + scalars?: SchemaKit.Hybrid.Scalar.ScalarMap operationVariables?: boolean } diff --git a/src/layers/3_SelectGraphQLMapper/nodes/5_Field.ts b/src/layers/3_SelectGraphQLMapper/nodes/5_Field.ts index b1e1cb6df..2515c492f 100644 --- a/src/layers/3_SelectGraphQLMapper/nodes/5_Field.ts +++ b/src/layers/3_SelectGraphQLMapper/nodes/5_Field.ts @@ -58,7 +58,7 @@ export const toGraphQLField: GraphQLPostOperationMapper< } default: { // dprint-ignore - if (SchemaDrivenDataMap.isScalar(sddm?.nt) || SchemaDrivenDataMap.isOutputField(sddm?.nt) || SchemaDrivenDataMap.isEnum(sddm?.nt)) throw new Error(`schema map scalar on non-scalar graffle selection.`) + if (SchemaDrivenDataMap.isScalarLike(sddm?.nt) || SchemaDrivenDataMap.isOutputField(sddm?.nt) || SchemaDrivenDataMap.isEnum(sddm?.nt)) throw new Error(`schema map scalar on non-scalar graffle selection.`) collectForInlineFragmentLike(context, sddm?.nt, keyParsed, { directives, selections, diff --git a/src/layers/3_SelectGraphQLMapper/nodes/Value.ts b/src/layers/3_SelectGraphQLMapper/nodes/Value.ts index 8cd95de16..34e84467c 100644 --- a/src/layers/3_SelectGraphQLMapper/nodes/Value.ts +++ b/src/layers/3_SelectGraphQLMapper/nodes/Value.ts @@ -2,6 +2,7 @@ import { SchemaDrivenDataMap } from '../../../extensions/CustomScalars/schemaDri import type { Grafaid } from '../../../lib/grafaid/__.js' import { Nodes } from '../../../lib/grafaid/_Nodes.js' import type { Scalar } from '../../1_Schema/_.js' +import { SchemaKit } from '../../1_Schema/__.js' import type { OperationContext } from '../context.js' import { type GraphQLPostOperationMapper } from '../mapper.js' @@ -10,8 +11,11 @@ export const toGraphQLValue: ValueMapper = (context, sddm, value) => { // const hookResult = context.hooks?.value?.(context, index, value) // if (hookResult) return hookResult - if (SchemaDrivenDataMap.isScalar(sddm?.nt)) { - return applyScalar(context, sddm.nt, value) + if (SchemaDrivenDataMap.isScalarLike(sddm?.nt)) { + const scalar = SchemaDrivenDataMap.isScalar(sddm.nt) + ? sddm.nt + : SchemaKit.Hybrid.Scalar.lookupCustomScalarOrFallbackToString(context.scalars, sddm.nt) + return applyScalar(context, scalar, value) } if (SchemaDrivenDataMap.isEnum(sddm?.nt)) { diff --git a/src/layers/3_SelectGraphQLMapper/toGraphQL.test.ts b/src/layers/3_SelectGraphQLMapper/toGraphQL.test.ts index 829355e27..610b498b0 100644 --- a/src/layers/3_SelectGraphQLMapper/toGraphQL.test.ts +++ b/src/layers/3_SelectGraphQLMapper/toGraphQL.test.ts @@ -1,8 +1,10 @@ import { expect, test } from 'vitest' +import { Date } from '../../../tests/_/fixtures/scalars.js' import { db } from '../../../tests/_/schemas/db.js' import { schemaDrivenDataMap } from '../../../tests/_/schemas/kitchen-sink/graffle/modules/SchemaDrivenDataMap.js' import type * as SelectionSets from '../../../tests/_/schemas/kitchen-sink/graffle/modules/SelectionSets.js' import { Grafaid } from '../../lib/grafaid/__.js' +import type { SchemaKit } from '../1_Schema/__.js' import { Select } from '../2_Select/__.js' import { toGraphQLDocument } from './nodes/1_Document.js' @@ -13,10 +15,21 @@ type CasesDescriptiveQuery = [ ] const testEachQueryWithDescription = test.for.bind(test) -const tester = (input: { variables: boolean }) => - [ - `( variables: ${String(input.variables)} ) - Query - %s`, - (args: CasesDescriptiveQuery) => { +type CasesDescriptiveQueryWithCustomScalars = [ + description: string, + selectionSet: SelectionSets.Query<{ Date: typeof Date }>, + options?: { operationName?: string }, +] +const testEachQueryWithDescriptionWithCustomScalars = test.for.bind(test) + +const tester = <$Scalars extends SchemaKit.Hybrid.Scalar.ScalarMap>( + input: { variables: boolean; scalars: $Scalars }, +) => { + // dprint-ignore + const message = `( variables: ${String(input.variables)}; scalars: ${Object.keys(input.scalars).join(`, `) || `(none)`} ) - Query - %s` + return [ + message, + (args: {} extends $Scalars ? CasesDescriptiveQuery : CasesDescriptiveQueryWithCustomScalars) => { const [description, graffleQuery, options] = args const { document, operationsVariables } = toGraphQLDocument( @@ -42,6 +55,7 @@ const tester = (input: { variables: boolean }) => expect(beforeAndAfter).toMatchSnapshot(description) }, ] as const +} // todo test a case where we provide an operation name // dprint-ignore @@ -67,20 +81,20 @@ const cases = testEachQueryWithDescription([ [`args - alias` , { stringWithArgs: [[`a`, { $: { id: `` }}]] }], [`args - x2 same` , { stringWithArgs: [[`a`, { $: { id: `` }}], [`b`,{$:{id:``}}]] }], [`args - string with args (empty object)` , { stringWithArgs: { $: {} } }], - // arguments custom scalars - [`args - custom scalar - arg field` , { dateArg: { $: { date: db.date0 } } }], - [`args - custom scalar - arg field in non-null` , { dateArgNonNull: { $: { date: db.date0 } } }], - [`args - custom scalar - arg field in list` , { dateArgList: { $: { date: [db.date0, new Date(1)] } } }], + [`args - object with args` , { objectWithArgs: { $: { id: `` }, id: true } }], + [`args - object with args (empty object)` , { objectWithArgs: { $: {}, id: true } }], + // arguments - custom scalars + [`args - custom scalar - arg field` , { dateArg: { $: { date: db.date0.getTime().toString() } } }], + [`args - custom scalar - arg field in non-null` , { dateArgNonNull: { $: { date: db.date0.getTime().toString() } } }], + [`args - custom scalar - arg field in list` , { dateArgList: { $: { date: [db.date0.getTime().toString(), db.date1.getTime().toString()] } } }], [`args - custom scalar - arg field in list (null)` , { dateArgList: { $: { date: null } } }], - [`args - custom scalar - arg field in non-null list (with list)` , { dateArgNonNullList: { $: { date: [db.date0, new Date(1)] } } }], - [`args - custom scalar - arg field in non-null list (with null)` , { dateArgNonNullList: { $: { date: [null, db.date0] } } }], - [`args - custom scalar - arg field in non-null list non-null` , { dateArgNonNullListNonNull: { $: { date: [db.date0, new Date(1)] } } }], - [`args - custom scalar - input object field` , { dateArgInputObject: { $: { input: { idRequired: ``, dateRequired: db.date0, date: new Date(1) } } } }], - [`args - custom scalar - nested input object field` , { InputObjectNested: { $: { input: { InputObject: { idRequired: ``, dateRequired: db.date0, date: new Date(1) } } } } }], + [`args - custom scalar - arg field in non-null list (with list)` , { dateArgNonNullList: { $: { date: [db.date0.getTime().toString(), db.date1.getTime().toString()] } } }], + [`args - custom scalar - arg field in non-null list (with null)` , { dateArgNonNullList: { $: { date: [null, db.date0.getTime().toString()] } } }], + [`args - custom scalar - arg field in non-null list non-null` , { dateArgNonNullListNonNull: { $: { date: [db.date0.getTime().toString(), db.date1.getTime().toString()] } } }], + [`args - custom scalar - input object field` , { dateArgInputObject: { $: { input: { idRequired: ``, dateRequired: db.date0.getTime().toString(), date: db.date1.getTime().toString() } } } }], + [`args - custom scalar - nested input object field` , { InputObjectNested: { $: { input: { InputObject: { idRequired: ``, dateRequired: db.date0.getTime().toString(), date: db.date1.getTime().toString() } } } } }], // s({ objectWithArgs: { $: { id: `` } } }), // todo should be static error // s({ objectWithArgs: { $: {} } }), // todo should be static error - [`args - object with args`, { objectWithArgs: { $: { id: `` }, id: true } }], - [`args - object with args (empty object)` , { objectWithArgs: { $: {}, id: true } }], // $include [`$include` , { object: { $include: true, id: true } }], [`$include (false)` , { object: { $include: false, id: true } }], @@ -110,5 +124,20 @@ const cases = testEachQueryWithDescription([ [`object scalar` , { object: { id: true } }], [`object nested` , { objectNested: { object: { string: true, id: true, int: false } } }], ]) -cases(...tester({ variables: true })) -cases(...tester({ variables: false })) +cases(...tester({ variables: true, scalars: {} })) +cases(...tester({ variables: false, scalars: {} })) + +// dprint-ignore +const customScalarWithCodecCases = testEachQueryWithDescriptionWithCustomScalars([ + [`args - custom scalar - arg field` , { dateArg: { $: { date: db.date0 } } }], + [`args - custom scalar - arg field in non-null` , { dateArgNonNull: { $: { date: db.date0 } } }], + [`args - custom scalar - arg field in list` , { dateArgList: { $: { date: [db.date0, db.date1] } } }], + [`args - custom scalar - arg field in list (null)` , { dateArgList: { $: { date: null } } }], + [`args - custom scalar - arg field in non-null list (with list)` , { dateArgNonNullList: { $: { date: [db.date0, db.date1] } } }], + [`args - custom scalar - arg field in non-null list (with null)` , { dateArgNonNullList: { $: { date: [null, db.date0] } } }], + [`args - custom scalar - arg field in non-null list non-null` , { dateArgNonNullListNonNull: { $: { date: [db.date0, db.date1] } } }], + [`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 } })) diff --git a/src/layers/5_request/core.ts b/src/layers/5_request/core.ts index a3e8c8b55..0c7a5bec0 100644 --- a/src/layers/5_request/core.ts +++ b/src/layers/5_request/core.ts @@ -72,6 +72,8 @@ export const anyware = Anyware.create({ request = graffleMappedResultToRequest( SelectionSetGraphqlMapper.toGraphQL(input.request.document, { sddm: input.state.config.schemaMap, + // todo test that when custom scalars are used they are mapped correctly + scalars: input.state.scalars, }), input.request.operationName, ) diff --git a/src/layers/5_request/hooks.ts b/src/layers/5_request/hooks.ts index f14f9f368..ddc17dee3 100644 --- a/src/layers/5_request/hooks.ts +++ b/src/layers/5_request/hooks.ts @@ -3,13 +3,13 @@ import type { Grafaid } from '../../lib/grafaid/__.js' import type { getRequestEncodeSearchParameters, postRequestEncodeBody } from '../../lib/grafaid/http/http.js' import type { httpMethodGet, httpMethodPost } from '../../lib/http.js' import type { Select } from '../2_Select/__.js' -import type { State } from '../6_client/fluent.js' +import type { ClientContext } from '../6_client/fluent.js' import type { Config } from '../6_client/Settings/Config.js' import type { MethodModeGetReads, MethodModePost } from '../6_client/transportHttp/request.js' import type { InterfaceRaw, InterfaceTyped, TransportHttp, TransportMemory } from './types.js' interface HookInputBase { - state: State + state: ClientContext } type InterfaceInput = diff --git a/src/layers/6_client/Settings/Config.ts b/src/layers/6_client/Settings/Config.ts index 4aa95d474..cc1ebdf7b 100644 --- a/src/layers/6_client/Settings/Config.ts +++ b/src/layers/6_client/Settings/Config.ts @@ -115,7 +115,7 @@ export type Config = { typeHooks: { onRequestResult: Extension.Hooks.OnRequestResult[] } - name: GlobalRegistry.ClientNames + name: GlobalRegistry.ClientNames // todo remove? it is in context output: OutputConfig schemaMap: SchemaDrivenDataMap | null transport: TransportConfigHttp | TransportConfigMemory diff --git a/src/layers/6_client/Settings/Input.ts b/src/layers/6_client/Settings/Input.ts index 287c5ee68..2e586a1be 100644 --- a/src/layers/6_client/Settings/Input.ts +++ b/src/layers/6_client/Settings/Input.ts @@ -19,8 +19,8 @@ export type InputOutputEnvelopeLonghand = { /** * @remarks This input extends base with properties that can be filled with exports from the generated client. */ -export type InputStatic<$RegisteredClient extends GlobalRegistry.ClientUnion = GlobalRegistry.ClientUnion> = - & InputBase<$RegisteredClient> +export type InputStatic<$Client extends GlobalRegistry.Client = GlobalRegistry.Client> = + & InputBase<$Client> & { /** * The schema to use. @@ -29,7 +29,7 @@ export type InputStatic<$RegisteredClient extends GlobalRegistry.ClientUnion = G * * @defaultValue 'default' */ - name?: $RegisteredClient['name'] + name?: $Client['name'] /** * todo */ @@ -39,10 +39,10 @@ export type InputStatic<$RegisteredClient extends GlobalRegistry.ClientUnion = G // TODO use code generation to display // TODO test that schema is optional when introspection was used to generate client. // dprint-ignore -export type InputBase<$RegisteredClient extends GlobalRegistry.ClientUnion> = +export type InputBase<$Client extends GlobalRegistry.Client> = | ( & ( - GlobalRegistry.HasDefaultUrlForSchema<$RegisteredClient> extends true + GlobalRegistry.HasDefaultUrlForSchema<$Client> extends true ? { /** * @defaultValue The introspection URL used to generate this Graffle client. @@ -55,11 +55,11 @@ export type InputBase<$RegisteredClient extends GlobalRegistry.ClientUnion> = ) // eslint-disable-next-line // @ts-ignore passes after generation - & WithInput<{ name: $RegisteredClient['name']; transport: { type: 'http'} }> + & WithInput<{ name: $Client['name']; transport: { type: 'http'} }> ) | ( & ( - GlobalRegistry.HasDefaultUrlForSchema<$RegisteredClient> extends true + GlobalRegistry.HasDefaultUrlForSchema<$Client> extends true ? { /** * TODO this TSDoc is never rendered in VSCode... @@ -71,5 +71,5 @@ export type InputBase<$RegisteredClient extends GlobalRegistry.ClientUnion> = ) // eslint-disable-next-line // @ts-ignore passes after generation - & WithInput<{ name: $RegisteredClient['name']; transport: { type: 'memory'} }> + & WithInput<{ name: $Client['name']; transport: { type: 'memory'} }> ) diff --git a/src/layers/6_client/client.test.ts b/src/layers/6_client/client.test.ts index ff72ee9f3..043fba967 100644 --- a/src/layers/6_client/client.test.ts +++ b/src/layers/6_client/client.test.ts @@ -7,8 +7,8 @@ import { Throws } from '../../extensions/Throws/Throws.js' const endpoint = new URL(`https://foo.io/api/graphql`) -describe(`without schemaIndex only raw is available`, () => { - const graffle = Graffle.create({ schema: endpoint }).use(Throws()) +describe(`without a registered client, only raw is available`, () => { + const graffle = Graffle.create({ name: `unknown`, schema: endpoint }).use(Throws()) test(`unavailable methods`, () => { // @ts-expect-error diff --git a/src/layers/6_client/client.ts b/src/layers/6_client/client.ts index 3c87ce827..284fb67ea 100644 --- a/src/layers/6_client/client.ts +++ b/src/layers/6_client/client.ts @@ -1,4 +1,5 @@ import { CustomScalars } from '../../extensions/CustomScalars/CustomScalars.js' +import type { ConfigManager } from '../../lib/config-manager/__.js' import type { Fluent } from '../../lib/fluent/__.js' import { proxyGet } from '../../lib/prelude.js' import { type UseFn, useProperties } from './extension/use.js' @@ -7,6 +8,7 @@ import { type FnGql, gqlProperties } from './gql/gql.js' import { anywareProperties, type FnAnyware } from './properties/anyware.js' import type { FnInternal } from './properties/internal.js' import { type FnRetry, retryProperties } from './properties/retry.js' +import { type ScalarFn, scalarProperties } from './properties/scalar.js' import { type FnWith, withProperties } from './properties/with.js' import { type FnRequestMethods, requestMethodsProperties } from './requestMethods/requestMethods.js' import { type InputStatic } from './Settings/Input.js' @@ -23,6 +25,7 @@ export type Client<$Context extends ClientContext> = Fluent.Materialize< UseFn, FnAnyware, FnGql, + ScalarFn, ] > > @@ -32,9 +35,7 @@ export type IncrementWthNewConfig< $ConfigNew extends ClientContext['config'], > = Fluent.IncrementWthNewContext< $Parameters, - { - config: $ConfigNew - } + ConfigManager.SetProperty<$Parameters['state']['context'], 'config', $ConfigNew> > // dprint-ignore @@ -42,11 +43,20 @@ type Create = <$Input extends InputStatic>(input: $Input) => // todo fixme // eslint-disable-next-line // @ts-ignore - Client<{ config: NormalizeInput<$Input> }> + Client<{ + name: $Input['name'] + input: $Input + config: NormalizeInput<$Input> + retry: null + extensions: [] + scalars: {} + }> export const create: Create = (input) => { const initialState = createState({ + name: input.name ?? `default`, // todo import from shared constants extensions: [CustomScalars()], + scalars: {}, retry: null, input, }) @@ -66,6 +76,7 @@ const createWithState = ( ...useProperties(createWithState, state), ...anywareProperties(createWithState, state), ...retryProperties(createWithState, state), + ...scalarProperties(createWithState, state), } // todo, these methods will become available even without a schema index present. diff --git a/src/layers/6_client/prefilled.ts b/src/layers/6_client/clientPrefilled.ts similarity index 60% rename from src/layers/6_client/prefilled.ts rename to src/layers/6_client/clientPrefilled.ts index 41d7e1758..ba5ad4b2b 100644 --- a/src/layers/6_client/prefilled.ts +++ b/src/layers/6_client/clientPrefilled.ts @@ -20,32 +20,23 @@ export const createPrefilled: CreatePrefilled = (name, schemaMap, schemaUrl) => // dprint-ignore export type CreatePrefilled = -(name: $Name, sddm: SchemaDrivenDataMap, schemaUrl?: URL) => - < +(name: $Name, sddm: SchemaDrivenDataMap, schemaUrl?: URL) => + <$Input extends InputBase>>(...args: + // TODO test that input optional when no required properties // eslint-disable-next-line // @ts-ignore passes after generation - $Input extends InputPrefilled, - >(...args: - // eslint-disable-next-line - // @ts-ignore passes after generation - HasRequiredKeys> extends true - // eslint-disable-next-line - // @ts-ignore passes after generation - ? [input: Exact<$Input, InputPrefilled>] - // TODO test that input optional when no required properties - // eslint-disable-next-line - // @ts-ignore passes after generation - : ([input: Exact<$Input, InputPrefilled>] | []) + HasRequiredKeys>> extends true + ? ([input: Exact<$Input, InputBase>>]) + : ([input: Exact<$Input, InputBase>>] | []) ) => // eslint-disable-next-line // @ts-ignore passes after generation Client<{ + name: $Name + input: $Input & { name: $Name, schemaMap: SchemaDrivenDataMap } + retry: null + extensions: [] + scalars: {} // @ts-expect-error fixme - TS cannot figure out that name input meets constraint config: NormalizeInput<$Input & { name: $Name, schemaMap: SchemaDrivenDataMap }>, }> - -// dprint-ignore -export type InputPrefilled<$Schema extends GlobalRegistry.ClientUnion> = - $Schema extends any - ? InputBase<$Schema> - : never diff --git a/src/layers/6_client/extension/extension.ts b/src/layers/6_client/extension/extension.ts index a6ff77cc9..f4fa70ec8 100644 --- a/src/layers/6_client/extension/extension.ts +++ b/src/layers/6_client/extension/extension.ts @@ -7,8 +7,8 @@ import type { Select } from '../../2_Select/__.js' import type { RequestCore } from '../../5_request/__.js' import type { GlobalRegistry } from '../../GlobalRegistry.js' import type { Client } from '../client.js' +import type { ClientContext } from '../fluent.js' import type { GraffleExecutionResultEnvelope } from '../handleOutput.js' -import type { Config } from '../Settings/Config.js' export interface TypeHooks { /** @@ -33,11 +33,13 @@ export interface TypeHooks { onRequestDocumentRootType?: Extension.Hooks.OnRequestDocumentRootType } -export type RunTypeHookOnRequestResult<$Config extends Config, $Params extends Extension.Hooks.OnRequestResult.Params> = - AssertConstraint< - Extension.Hooks.OnRequestResult.Params, - TypeFunction.CallPipeline<$Config['typeHooks']['onRequestResult'], $Params> - > +export type RunTypeHookOnRequestResult< + $Context extends ClientContext, + $Params extends Extension.Hooks.OnRequestResult.Params, +> = AssertConstraint< + Extension.Hooks.OnRequestResult.Params, + TypeFunction.CallPipeline<$Context['config']['typeHooks']['onRequestResult'], $Params> +> export interface EmptyTypeHooks { property: undefined @@ -95,7 +97,7 @@ interface Base { input: { path: string[] property: string - client: Client<{ schemaIndex: null; config: Config }> + client: Client }, ) => unknown } diff --git a/src/layers/6_client/extension/use.ts b/src/layers/6_client/extension/use.ts index 4a5e91476..678be0ecd 100644 --- a/src/layers/6_client/extension/use.ts +++ b/src/layers/6_client/extension/use.ts @@ -10,22 +10,26 @@ export interface UseFn extends Fluent.FnProperty<`use`> { export interface Use<$Args extends FnParametersProperty> { /** - * TODO Use Docs. + * TODO Docs. */ + // @ts-expect-error todo <$Extension extends Extension>(extension?: $Extension): Fluent.IncrementWithStateSet - }> - } + // context: $Args['state']['context'], + // If the extension adds type hooks, merge them into the config. + context: ConfigManager.SetAtPath< + $Args['state']['context'], + ['config', 'typeHooks', 'onRequestResult'], + ( + $Extension['typeHooks']['onRequestResult'] extends undefined + ? $Args['state']['context']['config']['typeHooks']['onRequestResult'] + // dprint-ignore + : [ + ...$Args['state']['context']['config']['typeHooks']['onRequestResult'], + $Extension['typeHooks']['onRequestResult'], + ] + ) + > + // If the extension adds properties, merge them into the state. properties: & $Args['state']['properties'] & ( diff --git a/src/layers/6_client/fluent.ts b/src/layers/6_client/fluent.ts index d4a03e0e0..2e544c660 100644 --- a/src/layers/6_client/fluent.ts +++ b/src/layers/6_client/fluent.ts @@ -1,15 +1,12 @@ import type { Anyware } from '../../lib/anyware/__.js' import type { Fluent } from '../../lib/fluent/__.js' +import type { SchemaKit } from '../1_Schema/__.js' import type { RequestCore } from '../5_request/__.js' import type { Extension } from './extension/extension.js' import type { Config } from './Settings/Config.js' import type { InputStatic } from './Settings/Input.js' import { inputToConfig } from './Settings/InputToConfig.js' -export type ClientContext = { - config: Config -} - export type FnClient<$Context extends ClientContext = ClientContext> = Fluent.Create<$Context> export type FnClientState = Fluent.State @@ -18,13 +15,13 @@ export type FnParametersProperty = Fluent.FnParametersProperty -export type Builder = (state: State) => Builder +export type Builder = (state: ClientContext) => Builder type PropertyDefinitions = Record Builder)> export const defineProperties = ( - definition: (builder: Builder, state: State) => PropertyDefinitions, -): (builder: Builder, state: State) => PropertyDefinitions => { + definition: (builder: Builder, state: ClientContext) => PropertyDefinitions, +): (builder: Builder, state: ClientContext) => PropertyDefinitions => { return (builder, state) => { return definition(builder, state) as any } @@ -40,20 +37,27 @@ export const defineProperties = ( type TerminusDefinitions = Record -export const defineTerminus = (property: (state: State) => TerminusDefinitions) => { - return (state: State) => { +/** + * Create a property or method that does NOT return the chain. + */ +export const defineTerminus = (property: (state: ClientContext) => TerminusDefinitions) => { + return (state: ClientContext) => { return property(state) } } -export interface State { +export interface ClientContext { + name: string input: InputStatic config: Config retry: Anyware.Extension2 | null extensions: Extension[] + scalars: RegisteredScalars } -export const createState = (stateWithoutConfig: StateWithoutConfig): State => { +export type RegisteredScalars = Record + +export const createState = (stateWithoutConfig: StateWithoutConfig): ClientContext => { let config: Config | null return { @@ -65,4 +69,4 @@ export const createState = (stateWithoutConfig: StateWithoutConfig): State => { } } -export type StateWithoutConfig = Omit +export type StateWithoutConfig = Omit diff --git a/src/layers/6_client/gql/gql.ts b/src/layers/6_client/gql/gql.ts index 42471bebe..086457009 100644 --- a/src/layers/6_client/gql/gql.ts +++ b/src/layers/6_client/gql/gql.ts @@ -9,15 +9,15 @@ import { } from '../../../lib/template-string.js' import { RequestCore } from '../../5_request/__.js' import type { InterfaceRaw } from '../../5_request/types.js' -import { defineTerminus } from '../fluent.js' +import { type ClientContext, defineTerminus } from '../fluent.js' import { handleOutput } from '../handleOutput.js' import type { Config } from '../Settings/Config.js' import { type DocumentController, resolveSendArguments, type sendArgumentsImplementation } from './send.js' // dprint-ignore -export interface gql<$Config extends Config = Config> { - <$Document extends Grafaid.Document.Typed.TypedDocumentLike>(document: $Document ): DocumentController<$Config, $Document> - <$Document extends Grafaid.Document.Typed.TypedDocumentLike>(parts: TemplateStringsArray, ...args: unknown[]): DocumentController<$Config, $Document> +export interface gql<$Context extends ClientContext = ClientContext> { + <$Document extends Grafaid.Document.Typed.TypedDocumentLike>(document: $Document ): DocumentController<$Context, $Document> + <$Document extends Grafaid.Document.Typed.TypedDocumentLike>(parts: TemplateStringsArray, ...args: unknown[]): DocumentController<$Context, $Document> } type gqlArguments = [Grafaid.Document.Typed.TypedDocumentLike] | TemplateStringsArguments diff --git a/src/layers/6_client/gql/send.ts b/src/layers/6_client/gql/send.ts index 355a9b869..af4f1d641 100644 --- a/src/layers/6_client/gql/send.ts +++ b/src/layers/6_client/gql/send.ts @@ -1,7 +1,7 @@ import type { Grafaid } from '../../../lib/grafaid/__.js' import { isString, type SimplifyNullable } from '../../../lib/prelude.js' +import type { ClientContext } from '../fluent.js' import type { HandleOutput } from '../handleOutput.js' -import type { Config } from '../Settings/Config.js' // dprint-ignore export type SendArguments<$TypedDocument extends string | Grafaid.Document.Typed.TypedDocumentLike> = @@ -21,9 +21,9 @@ type SendArguments__<$Variables extends Grafaid.Document.Typed.Variables, $Varia never // dprint-ignore -export interface DocumentController<$Config extends Config, $TypedDocument extends Grafaid.Document.Typed.TypedDocumentLike> { +export interface DocumentController<$Context extends ClientContext, $TypedDocument extends Grafaid.Document.Typed.TypedDocumentLike> { send(...args: SendArguments<$TypedDocument>): - Promise>>> + Promise>>> } export type sendArgumentsImplementation = diff --git a/src/layers/6_client/handleOutput.ts b/src/layers/6_client/handleOutput.ts index 556ec5fae..899e18074 100644 --- a/src/layers/6_client/handleOutput.ts +++ b/src/layers/6_client/handleOutput.ts @@ -12,7 +12,7 @@ import { import type { TransportHttp } from '../5_request/types.js' import type { GlobalRegistry } from '../GlobalRegistry.js' import type { RunTypeHookOnRequestResult } from './extension/extension.js' -import type { State } from './fluent.js' +import type { ClientContext } from './fluent.js' import { type Config, type ErrorCategory, @@ -55,7 +55,7 @@ export type GraffleExecutionResultVar<$Config extends Config = Config> = | ErrorsOther export const handleOutput = ( - state: State, + state: ClientContext, result: GraffleExecutionResultVar, ) => { if (isContextConfigTraditionalGraphQLOutput(state.config)) { @@ -110,8 +110,8 @@ export const handleOutput = ( */ // dprint-ignore -export type HandleOutputGraffleRootField<$Config extends Config, $Data extends SomeObjectData, $RootFieldName extends string> = - HandleOutputGraffleRootField_Data>, $RootFieldName> +export type HandleOutputGraffleRootField<$Context extends ClientContext, $Data extends SomeObjectData, $RootFieldName extends string> = + HandleOutputGraffleRootField_Data>, $RootFieldName> // dprint-ignore type HandleOutputGraffleRootField_Data<$Output extends Error | SomeObjectData | GraffleExecutionResultEnvelope, $RootFieldName extends string> = @@ -120,27 +120,27 @@ type HandleOutputGraffleRootField_Data<$Output extends Error | SomeObjectData | : GetOrNever, $RootFieldName> // dprint-ignore -export type HandleOutput<$Config extends Config, $Data extends SomeObjectData> = - HandleOutput_Extensions<$Config, Envelope<$Config, $Data>> +export type HandleOutput<$Context extends ClientContext, $Data extends SomeObjectData> = + HandleOutput_Extensions<$Context, Envelope<$Context, $Data>> -type HandleOutput_Extensions<$Config extends Config, $Envelope extends GraffleExecutionResultEnvelope> = +type HandleOutput_Extensions<$Context extends ClientContext, $Envelope extends GraffleExecutionResultEnvelope> = HandleOutput_ErrorsReturn< - $Config, + $Context, // eslint-disable-next-line // @ts-ignore fixme - RunTypeHookOnRequestResult<$Config, { + RunTypeHookOnRequestResult<$Context, { result: $Envelope - registeredSchema: GlobalRegistry.GetOrDefault<$Config['name']> + registeredSchema: GlobalRegistry.GetOrDefault<$Context['config']['name']> }>['result'] > -type HandleOutput_ErrorsReturn<$Config extends Config, $Envelope extends GraffleExecutionResultEnvelope> = - | IfConfiguredGetOutputErrorReturns<$Config> - | HandleOutput_Envelope<$Config, $Envelope> +type HandleOutput_ErrorsReturn<$Context extends ClientContext, $Envelope extends GraffleExecutionResultEnvelope> = + | IfConfiguredGetOutputErrorReturns<$Context> + | HandleOutput_Envelope<$Context, $Envelope> // dprint-ignore -type HandleOutput_Envelope<$Config extends Config, $Envelope extends GraffleExecutionResultEnvelope> = - $Config['output']['envelope']['enabled'] extends true +type HandleOutput_Envelope<$Context extends ClientContext, $Envelope extends GraffleExecutionResultEnvelope> = + $Context['config']['output']['envelope']['enabled'] extends true ? $Envelope : ExcludeUndefined<$Envelope['data']> // todo make data field not undefinable @@ -184,36 +184,36 @@ type HandleOutput_Envelope<$Config extends Config, $Envelope extends GraffleExec // ) // dprint-ignore -type IfConfiguredGetOutputErrorReturns<$Config extends Config> = - | (ConfigGetOutputError<$Config, 'execution'> extends 'return' ? GraphQLExecutionResultError : never) - | (ConfigGetOutputError<$Config, 'other'> extends 'return' ? ErrorsOther : never) +type IfConfiguredGetOutputErrorReturns<$Context extends ClientContext> = + | (ConfigGetOutputError<$Context, 'execution'> extends 'return' ? GraphQLExecutionResultError : never) + | (ConfigGetOutputError<$Context, 'other'> extends 'return' ? ErrorsOther : never) // dprint-ignore -export type ConfigGetOutputError<$Config extends Config, $ErrorCategory extends ErrorCategory> = - $Config['output']['envelope']['enabled'] extends true - ? ConfigGetOutputEnvelopeErrorChannel<$Config, $ErrorCategory> - : ConfigResolveOutputErrorChannel<$Config, $Config['output']['errors'][$ErrorCategory]> +export type ConfigGetOutputError<$Context extends ClientContext, $ErrorCategory extends ErrorCategory> = + $Context['config']['output']['envelope']['enabled'] extends true + ? ConfigGetOutputEnvelopeErrorChannel<$Context, $ErrorCategory> + : ConfigResolveOutputErrorChannel<$Context, $Context['config']['output']['errors'][$ErrorCategory]> // dprint-ignore -type ConfigGetOutputEnvelopeErrorChannel<$Config extends Config, $ErrorCategory extends ErrorCategory> = - $Config['output']['envelope']['errors'][$ErrorCategory] extends true +type ConfigGetOutputEnvelopeErrorChannel<$Context extends ClientContext, $ErrorCategory extends ErrorCategory> = + $Context['config']['output']['envelope']['errors'][$ErrorCategory] extends true ? false - : ConfigResolveOutputErrorChannel<$Config, $Config['output']['errors'][$ErrorCategory]> + : ConfigResolveOutputErrorChannel<$Context, $Context['config']['output']['errors'][$ErrorCategory]> -type ConfigResolveOutputErrorChannel<$Config extends Config, $Channel extends OutputChannelConfig | false> = - $Channel extends 'default' ? $Config['output']['defaults']['errorChannel'] +type ConfigResolveOutputErrorChannel<$Context extends ClientContext, $Channel extends OutputChannelConfig | false> = + $Channel extends 'default' ? $Context['config']['output']['defaults']['errorChannel'] : $Channel extends false ? false : $Channel // dprint-ignore // todo use ObjMap for $Data -export type Envelope<$Config extends Config, $Data = unknown, $Errors extends ReadonlyArray = ReadonlyArray> = +export type Envelope<$Context extends ClientContext, $Data = unknown, $Errors extends ReadonlyArray = ReadonlyArray> = & { data?: $Data | null extensions?: ObjMap } & ( - $Config['transport']['type'] extends 'http' + $Context['config']['transport']['type'] extends 'http' ? { response: Response } : {} ) @@ -221,7 +221,7 @@ export type Envelope<$Config extends Config, $Data = unknown, $Errors extends Re & ( $Errors extends [] ? {} - : IsEnvelopeWithoutErrors<$Config> extends true + : IsEnvelopeWithoutErrors<$Context> extends true ? {} : { errors?: ReadonlyArray @@ -233,9 +233,9 @@ type ObjMap = { } // dprint-ignore -type IsEnvelopeWithoutErrors<$Config extends Config> = - $Config['output']['envelope']['enabled'] extends true - ? Values<$Config['output']['envelope']['errors']> extends false +type IsEnvelopeWithoutErrors<$Context extends ClientContext> = + $Context['config']['output']['envelope']['enabled'] extends true + ? Values<$Context['config']['output']['envelope']['errors']> extends false ? true : false : false diff --git a/src/layers/6_client/properties/scalar.ts b/src/layers/6_client/properties/scalar.ts new file mode 100644 index 000000000..94970eb6d --- /dev/null +++ b/src/layers/6_client/properties/scalar.ts @@ -0,0 +1,38 @@ +import type { ConfigManager } from '../../../lib/config-manager/__.js' +import type { Fluent } from '../../../lib/fluent/__.js' +import type { SchemaKit } from '../../1_Schema/__.js' +import { type ClientContext, defineProperties, type FnParametersProperty } from '../fluent.js' + +export interface ScalarFn extends Fluent.FnProperty<`scalar`> { + // @ts-expect-error untyped params + return: Scalar +} + +export interface Scalar<$Args extends FnParametersProperty> { + /** + * TODO Docs. + */ + // @ts-expect-error todo + <$Scalar extends SchemaKit.Scalar.Scalar>(scalar: $Scalar): Fluent.IncrementWithStateSet + properties: $Args['state']['properties'] + }> +} + +export const scalarProperties = defineProperties((builder, state) => { + return { + scalar: (scalar: SchemaKit.Scalar.Scalar) => { + return builder({ + ...state, + scalars: { + ...state.scalars, + [scalar.name]: scalar, + }, + }) + }, + } +}) 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 5f7fe3fd0..a78ce164a 100644 --- a/src/layers/6_client/requestMethods/client.rootMethods.test-d.ts +++ b/src/layers/6_client/requestMethods/client.rootMethods.test-d.ts @@ -1,9 +1,11 @@ /* eslint-disable */ import { expectTypeOf, test } from 'vitest' +import { Date } 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 }) +const graffle = Graffle.create({ schema: Schema.schema }).scalar(Date) const x = await graffle.query.id({ $include: false }) // dprint-ignore @@ -29,12 +31,15 @@ test(`query`, async () => { // todo // expectTypeOf(await graffle.query.idNonNull({ $skip: false })).toEqualTypeOf() + const x = await graffle.query.dateObject1({ $scalars: true }) + // object expectTypeOf(graffle.query.dateObject1({ date1: true })).resolves.toEqualTypeOf<{ date1: Date | null } | null>() - expectTypeOf(graffle.query.dateObject1({ $scalars: true })).resolves.toEqualTypeOf<{ __typename: "DateObject1"; date1: Date | null } | null>() expectTypeOf(graffle.query.unionFooBar({ ___on_Foo: { id: true }})).resolves.toEqualTypeOf<{} | { id: string | null } | null>() expectTypeOf(graffle.query.interface({ id: true })).resolves.toEqualTypeOf() expectTypeOf(graffle.query.interface({ ___on_Object1ImplementingInterface: { int: true }})).resolves.toEqualTypeOf<{} | { int: number | null } | null>() + // object with scalars wildcard + expectTypeOf(graffle.query.dateObject1({ $scalars: true })).resolves.toEqualTypeOf<{ __typename: `DateObject1`; date1: Date | null } | null>() // @ts-expect-error missing input selection set graffle.query.dateObject1() diff --git a/src/layers/6_client/requestMethods/client.rootMethods.test.ts b/src/layers/6_client/requestMethods/client.rootMethods.test.ts index ea2ee43e3..b645d8fcf 100644 --- a/src/layers/6_client/requestMethods/client.rootMethods.test.ts +++ b/src/layers/6_client/requestMethods/client.rootMethods.test.ts @@ -9,13 +9,13 @@ describe(`query`, () => { 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(`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 }) => { - await expect(kitchenSink.query.dateObject1({ date1: true })).resolves.toEqual({ date1: db.date0 }) + 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` }) diff --git a/src/layers/6_client/requestMethods/document.ts b/src/layers/6_client/requestMethods/document.ts index 99c058426..25e174ea4 100644 --- a/src/layers/6_client/requestMethods/document.ts +++ b/src/layers/6_client/requestMethods/document.ts @@ -3,12 +3,12 @@ import type { Schema } from '../../../generator/generators/Schema.js' import type { IsTupleMultiple } from '../../../lib/prelude.js' import type { Select } from '../../2_Select/__.js' import type { InferResult } from '../../3_InferResult/__.js' +import type { ClientContext } from '../fluent.js' import { type HandleOutput } from '../handleOutput.js' -import type { Config } from '../Settings/Config.js' // dprint-ignore export type DocumentRunner< - $$Config extends Config, + $$ClientContext extends ClientContext, $$Schema extends Schema, $$Document extends Select.Document.SomeDocument, $$Name extends Select.Document.GetOperationNames<$$Document> = Select.Document.GetOperationNames<$$Document> @@ -19,7 +19,7 @@ export type DocumentRunner< >(...params: $Params) => Promise< HandleOutput< - $$Config, + $$ClientContext, InferResult.Root< Select.Document.GetOperation<$$Document, $Name>, $$Schema, diff --git a/src/layers/6_client/requestMethods/requestMethods.ts b/src/layers/6_client/requestMethods/requestMethods.ts index d547d8357..d20957532 100644 --- a/src/layers/6_client/requestMethods/requestMethods.ts +++ b/src/layers/6_client/requestMethods/requestMethods.ts @@ -5,7 +5,7 @@ import { isSymbol } from '../../../lib/prelude.js' import { Select } from '../../2_Select/__.js' import { RequestCore } from '../../5_request/__.js' import type { GlobalRegistry } from '../../GlobalRegistry.js' -import { type ClientContext, defineTerminus, type State } from '../fluent.js' +import { type ClientContext, defineTerminus } from '../fluent.js' import { handleOutput } from '../handleOutput.js' import type { Config } from '../Settings/Config.js' @@ -15,9 +15,13 @@ export interface FnRequestMethods extends Fluent.FnMerge { } // dprint-ignore -export type BuilderRequestMethods<$Context extends ClientContext>= +export type BuilderRequestMethods<$Context extends ClientContext> = & ( - $Context['config']['schemaMap'] extends null + // todo + // GlobalRegistry.Has<$Context['name']> extends false + // eslint-disable-next-line + // @ts-ignore passes after generation + GlobalRegistry.Has<$Context['config']['name']> extends false ? {} : ( @@ -42,7 +46,7 @@ export const requestMethodsProperties = defineTerminus((state) => { } }) -export const createMethodDocument = (state: State) => (document: Select.Document.DocumentObject) => { +export const createMethodDocument = (state: ClientContext) => (document: Select.Document.DocumentObject) => { const documentNormalized = Select.Document.normalizeOrThrow(document) return { run: async (maybeOperationName?: string) => { @@ -51,7 +55,7 @@ export const createMethodDocument = (state: State) => (document: Select.Document } } -const createMethodRootType = (state: State, rootTypeName: Grafaid.Schema.RootTypeName) => { +const createMethodRootType = (state: ClientContext, rootTypeName: Grafaid.Schema.RootTypeName) => { return new Proxy({}, { get: (_, key) => { if (isSymbol(key)) throw new Error(`Symbols not supported.`) @@ -69,7 +73,7 @@ const createMethodRootType = (state: State, rootTypeName: Grafaid.Schema.RootTyp } const executeRootField = async ( - state: State, + state: ClientContext, rootTypeName: Grafaid.Schema.RootTypeName, rootFieldName: string, rootFieldSelectionSet?: Select.SelectionSet.AnySelectionSet, @@ -87,7 +91,7 @@ const executeRootField = async ( } const executeRootType = async ( - state: State, + state: ClientContext, rootTypeName: Grafaid.Schema.RootTypeName, rootTypeSelectionSet: Select.SelectionSet.AnySelectionSet, ) => { @@ -101,7 +105,7 @@ const executeRootType = async ( } export const executeDocument = async ( - state: State, + state: ClientContext, document: Select.Document.DocumentNormalized, operationName?: string, variables?: Grafaid.Variables, diff --git a/src/layers/GlobalRegistry.ts b/src/layers/GlobalRegistry.ts index de26c189d..12e077dcd 100644 --- a/src/layers/GlobalRegistry.ts +++ b/src/layers/GlobalRegistry.ts @@ -62,7 +62,7 @@ export namespace GlobalRegistry { : keyof GraffleGlobal.Clients // dprint-ignore - export type HasDefaultUrlForSchema<$Schema extends ClientUnion> = + export type HasDefaultUrlForSchema<$Schema extends Client> = $Schema['defaultSchemaUrl'] extends null ? false : true @@ -75,6 +75,26 @@ export namespace GlobalRegistry { // @ts-ignore passes after generation export type SchemaDefault = GetSchema + // dprint-ignore + export type Has<$Name extends string> = + $Name extends ClientNames + ? true + : false + + export type Get<$Name extends string> = $Name extends ClientNames + // eslint-disable-next-line + // @ts-ignore passes after generation + ? GraffleGlobal.Clients[$Name] + : never + + // dprint-ignore + export type GetOrGeneric<$Name extends string> = + IsEmpty extends true + ? Client + : $Name extends keyof Clients + ? Clients[$Name] + : Client + // dprint-ignore export type GetOrDefault<$Name extends ClientNames | undefined> = $Name extends ClientNames diff --git a/src/lib/Code.ts b/src/lib/Code.ts index 6b29d2552..7539381b2 100644 --- a/src/lib/Code.ts +++ b/src/lib/Code.ts @@ -4,9 +4,10 @@ import { linesPrepend, linesTrim } from './text.js' type FieldTuple = [k: string, v: string | null, tsDoc?: string | null] export namespace Code { - export const field = (name: string, type: string, options?: { optional?: boolean }) => { - if (options?.optional) return `${name}?: ${type}` - return `${name}: ${type}` + export const field = (name: string, type: string, options?: { tsDoc?: string | null; optional?: boolean }) => { + const tsDoc = options?.tsDoc ? TSDoc(options.tsDoc) + `\n` : `` + const optional = options?.optional ? `?` : `` + return `${tsDoc}${name}${optional}: ${type}` } export interface DirectiveTermObject { $spread?: string[] @@ -111,7 +112,7 @@ export namespace Code { // type export const nullable = (type: string) => `${type} | null` export const union = (name: string, types: string[]) => `type ${name} =\n| ${Code.unionItems(types)}` - export const unionItems = (types: string[]) => types.join(`\n| `) + export const unionItems = (types: (string | null)[]) => types.filter(_ => _ !== null).join(`\n| `) export const tuple = (types: string[]) => termList(types) export const list = (type: string) => `Array<${type}>` export const optionalField = (name: string, type: string) => Code.field(name, type, { optional: true }) diff --git a/src/lib/config-manager/ConfigManager.test-d.ts b/src/lib/config-manager/ConfigManager.test-d.ts index 0998afe9e..1833e5a8b 100644 --- a/src/lib/config-manager/ConfigManager.test-d.ts +++ b/src/lib/config-manager/ConfigManager.test-d.ts @@ -1,6 +1,12 @@ +import type { ClientContext } from '../../entrypoints/utilities-for-generated.js' import { assertEqual } from '../assert-equal.js' import type { ConfigManager } from './__.js' +interface a1 { + a: { b: number } + b: string +} + interface x1 { z: number a: [1] @@ -16,7 +22,6 @@ assertEqual< { z: number; a: [1, 2]; b: boolean; c: { y: 2 } } >() -// ConfigManager assertEqual, { a: { b: 2 }; a2: 2 }>() assertEqual, { a: { b: 3 } }>() assertEqual, { a: { b: 3 } }>() @@ -24,3 +29,25 @@ assertEqual, { a: { b: 3 } }>( assertEqual, never>() assertEqual, never>() assertEqual, { a: { b: never } }>() + +assertEqual, { a: { b: 2 }; b: string }>() + +// dprint-ignore +{ +assertEqual , a1>() +assertEqual , { a: { b: 2 }; b: string }>() +assertEqual , { a: { x: 2 }; b: string }>() +assertEqual , { a: { b: 9 }; b: string }>() +assertEqual , { a: { b: { c: 9 } }; b: string }>() +assertEqual , { a: { b: number; b2: { c: 9 } }; b: string }>() +assertEqual , { a: { b: number }; b: string; c: 9 }>() +} + +assertEqual< + ConfigManager.SetAtPath< + ClientContext, + ['config', 'typeHooks', 'onRequestResult'], + ClientContext['config']['typeHooks']['onRequestResult'] + >, + ClientContext +>() diff --git a/src/lib/config-manager/ConfigManager.ts b/src/lib/config-manager/ConfigManager.ts index 1fcd89f38..1ef868e28 100644 --- a/src/lib/config-manager/ConfigManager.ts +++ b/src/lib/config-manager/ConfigManager.ts @@ -33,6 +33,20 @@ export const createMerger = <$CustomScalars extends CustomScalarGuard[]>( return (defaults, input) => mergeDefaults_(defaults, input, customScalars) as any } +// dprint-ignore +export type SetAtPath<$Object extends object, $Path extends string[], $Value> = + $Path extends [] + ? $Object + : $Path extends [infer $Key extends string, ...infer $PathRest extends string[]] + ? $PathRest extends [] + ? Omit<$Object, $Key> & { [_ in $Key]: $Value } + : $Key extends keyof $Object + ? $Object[$Key] extends object + ? Omit<$Object, $Key> & { [_ in $Key]: SetAtPath<$Object[$Key], $PathRest, $Value> } + : Omit<$Object, $Key> & { [_ in $Key]: SetAtPath<{}, $PathRest, $Value> } + : $Object & { [_ in $Key]: SetAtPath<{}, $PathRest, $Value> } + : never + type MergeDefaultsFn<$CustomScalars> = <$Defaults extends object, $Input extends undefined | PartialDeep<$Defaults>>( defaults: $Defaults, input?: $Input, diff --git a/src/lib/grafaid/request.ts b/src/lib/grafaid/request.ts index 39af02179..e1e20c542 100644 --- a/src/lib/grafaid/request.ts +++ b/src/lib/grafaid/request.ts @@ -1,6 +1,6 @@ import type { GraphQLError, OperationDefinitionNode, OperationTypeNode } from 'graphql' -import type { StandardScalarRuntimeTypes } from '../../layers/1_Schema/Hybrid/types/Scalar/Scalar.js' import type { Errors } from '../errors/__.js' +import type { Grafaid } from './__.js' import { getOperationDefinition, normalizeDocumentToNode } from './document.js' import type { RootTypeName } from './schema/schema.js' import type { TypedDocument } from './typed-document/__.js' @@ -32,7 +32,7 @@ export type Variables = { } export type SomeObjectData = Record -export type SomeFieldData = SomeObjectData | StandardScalarRuntimeTypes +export type SomeFieldData = SomeObjectData | Grafaid.Schema.StandardScalarRuntimeTypes export type GraphQLExecutionResultError = Errors.ContextualAggregateError diff --git a/src/lib/grafaid/schema/args.ts b/src/lib/grafaid/schema/args.ts index 69f97c109..41e0ecf8e 100644 --- a/src/lib/grafaid/schema/args.ts +++ b/src/lib/grafaid/schema/args.ts @@ -12,6 +12,7 @@ export const analyzeArgsNullability = (args: readonly GraphQLArgument[]) => { let required = 0 let optional = 0 const total = args.length + args.forEach(_ => { if (isNonNullType(_.type)) { required++ diff --git a/src/lib/grafaid/schema/schema.ts b/src/lib/grafaid/schema/schema.ts index 270afdde6..dc32bab60 100644 --- a/src/lib/grafaid/schema/schema.ts +++ b/src/lib/grafaid/schema/schema.ts @@ -117,6 +117,16 @@ export const standardScalarTypeNames = { Boolean: `Boolean`, } +export interface StandardScalarRuntimeTypeMap { + String: string + ID: string + Int: number + Float: number + Boolean: boolean +} + +export type StandardScalarRuntimeTypes = StandardScalarRuntimeTypeMap[keyof StandardScalarRuntimeTypeMap] + export const isScalarTypeAndCustom = (node: unknown): node is GraphQLScalarType => { return isScalarType(node) && isScalarTypeCustom(node) } diff --git a/tests/_/schemas/kitchen-sink/customScalarCodecs.ts b/tests/_/fixtures/scalars.ts similarity index 73% rename from tests/_/schemas/kitchen-sink/customScalarCodecs.ts rename to tests/_/fixtures/scalars.ts index 7dc741db7..a5545d956 100644 --- a/tests/_/schemas/kitchen-sink/customScalarCodecs.ts +++ b/tests/_/fixtures/scalars.ts @@ -1,4 +1,4 @@ -import { Graffle } from '../../../../src/entrypoints/main.js' +import { Graffle } from '../../../src/entrypoints/main.js' export const Date = Graffle.Scalars.create(`Date`, { encode: (value: globalThis.Date) => value.toISOString(), diff --git a/tests/_/helpers.ts b/tests/_/helpers.ts index d4b65b5fa..8d3fcdc63 100644 --- a/tests/_/helpers.ts +++ b/tests/_/helpers.ts @@ -1,13 +1,13 @@ import type { Mock } from 'vitest' import { test as testBase, vi } from 'vitest' import { Graffle } from '../../src/entrypoints/main.js' -import type { Config } from '../../src/entrypoints/utilities-for-generated.js' +import type { ClientContext } from '../../src/entrypoints/utilities-for-generated.js' import type { Client } from '../../src/layers/6_client/client.js' +import type { ConfigManager } from '../../src/lib/config-manager/__.js' import { CONTENT_TYPE_REC } from '../../src/lib/grafaid/http/http.js' import { type SchemaService, serveSchema } from './lib/serveSchema.js' import { db } from './schemas/db.js' import { Graffle as KitchenSink } from './schemas/kitchen-sink/graffle/__.js' -import { type Schema as KitchenSinkSchema } from './schemas/kitchen-sink/graffle/modules/Schema.js' import { schema as kitchenSinkSchema } from './schemas/kitchen-sink/schema.js' import { schema } from './schemas/pokemon/schema.js' @@ -19,9 +19,9 @@ export const createResponse = (body: object) => interface Fixtures { fetch: Mock<(request: Request) => Promise> pokemonService: SchemaService - graffle: Client<{ config: Config; schemaIndex: null }> - kitchenSink: Client<{ config: Config & { name: 'default' }; schemaIndex: KitchenSinkSchema }> - kitchenSinkHttp: Client<{ config: Config & { name: 'default' }; schemaIndex: KitchenSinkSchema }> + graffle: Client + kitchenSink: Client> + kitchenSinkHttp: Client> kitchenSinkData: typeof db } diff --git a/tests/_/schemas/db.ts b/tests/_/schemas/db.ts index 808648a40..48df17fa9 100644 --- a/tests/_/schemas/db.ts +++ b/tests/_/schemas/db.ts @@ -21,12 +21,19 @@ const float = 123.456 const boolean = true +const ABCEnum = { + A: `A`, + B: `B`, + C: `C`, +} as const + const Object1 = { string, int, float, boolean, id, + ABCEnum: ABCEnum.A, } const Foo = { @@ -41,7 +48,7 @@ export const db = { int, }, Interface: { id }, - ABCEnum: `A`, + ABCEnum: ABCEnum.A, ErrorOne: { message: `errorOne`, infoId: id }, ErrorTwo: { message: `errorOne`, infoInt: int }, ErrorOneError, @@ -51,7 +58,9 @@ export const db = { id1: id, string, date0: new Date(0), + date0Encoded: new Date(0).toISOString(), date1: new Date(1), + date1Encoded: new Date(1).toISOString(), Foo, Bar: { int, @@ -69,3 +78,7 @@ export const db = { }, errorAggregate, } as const + +export namespace db { + export type ABCEnum = (typeof ABCEnum)[keyof typeof ABCEnum] +} diff --git a/tests/_/schemas/generate.ts b/tests/_/schemas/generate.ts index 64e212814..31bec7b44 100644 --- a/tests/_/schemas/generate.ts +++ b/tests/_/schemas/generate.ts @@ -59,6 +59,6 @@ await generate({ await generate({ dirName: `kitchen-sink`, input: { - customScalarCodecs: `./kitchen-sink/customScalarCodecs.ts`, + // customScalarCodecs: `./kitchen-sink/customScalarCodecs.ts`, }, }) diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/Global.ts b/tests/_/schemas/kitchen-sink/graffle/modules/Global.ts index 9975161e8..0089c3a62 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/Global.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/Global.ts @@ -16,9 +16,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: { - Date: Scalar.Date - } defaultSchemaUrl: null } } diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/MethodsDocument.ts b/tests/_/schemas/kitchen-sink/graffle/modules/MethodsDocument.ts index 459d5b141..ac1681bcf 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/MethodsDocument.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/MethodsDocument.ts @@ -2,9 +2,11 @@ import type * as Utilities from '../../../../../../src/entrypoints/utilities-for import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -14,5 +16,5 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/MethodsRoot.ts b/tests/_/schemas/kitchen-sink/graffle/modules/MethodsRoot.ts index d8f2d14bb..3df8e6077 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/MethodsRoot.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/MethodsRoot.ts @@ -1,87 +1,91 @@ import { type Simplify } from 'type-fest' import type { InferResult } from '../../../../../../src/entrypoints/schema.js' -import type * as Utils from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface MutationMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation>) => Promise< +export interface MutationMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Mutation<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Mutation<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Mutation' }, '__typename' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > } -export interface QueryMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query>) => Promise< +export interface QueryMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Query<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Query<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Query' }, '__typename' > > > InputObjectNested: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.InputObjectNested>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.InputObjectNested<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ InputObjectNested: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ InputObjectNested: $SelectionSet }, Schema<$Context['scalars']>>, 'InputObjectNested' > > > InputObjectNestedNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.InputObjectNestedNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.InputObjectNestedNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ InputObjectNestedNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ InputObjectNestedNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'InputObjectNestedNonNull' > > @@ -89,387 +93,434 @@ export interface QueryMethods<$Config extends Utils.Config> { /** * Query enum field documentation. */ - abcEnum: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.abcEnum>) => Promise< + abcEnum: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.abcEnum<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ abcEnum: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ abcEnum: $SelectionSet }, Schema<$Context['scalars']>>, 'abcEnum' > > > argInputObjectCircular: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.argInputObjectCircular>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.argInputObjectCircular<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ argInputObjectCircular: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ argInputObjectCircular: $SelectionSet }, Schema<$Context['scalars']>>, 'argInputObjectCircular' > > > - date: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.date>) => Promise< + date: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.date<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ date: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ date: $SelectionSet }, Schema<$Context['scalars']>>, 'date' > > > - dateArg: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArg>) => Promise< + dateArg: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArg<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArg: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArg' > > > dateArgInputObject: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgInputObject>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgInputObject<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgInputObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgInputObject: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgInputObject' > > > - dateArgList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgList>) => Promise< + dateArgList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgList' > > > dateArgNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNull' > > > dateArgNonNullList: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullList>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullList<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNullList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNullList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNullList' > > > dateArgNonNullListNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullListNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateArgNonNullListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateArgNonNullListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateArgNonNullListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateArgNonNullListNonNull' > > > dateInterface1: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateInterface1>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateInterface1<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateInterface1: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateInterface1: $SelectionSet }, Schema<$Context['scalars']>>, 'dateInterface1' > > > - dateList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateList>) => Promise< + dateList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateList' > > > - dateListList: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateListList>) => Promise< + dateListList: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateListList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateListList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateListList: $SelectionSet }, Schema<$Context['scalars']>>, 'dateListList' > > > dateListNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateListNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateListNonNull' > > > - dateNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.dateNonNull>) => Promise< + dateNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'dateNonNull' > > > - dateObject1: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateObject1>) => Promise< + dateObject1: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateObject1<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateObject1: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateObject1: $SelectionSet }, Schema<$Context['scalars']>>, 'dateObject1' > > > - dateUnion: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.dateUnion>) => Promise< + dateUnion: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.dateUnion<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ dateUnion: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ dateUnion: $SelectionSet }, Schema<$Context['scalars']>>, 'dateUnion' > > > - error: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.error>) => Promise< + error: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.error<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ error: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ error: $SelectionSet }, Schema<$Context['scalars']>>, 'error' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > - interface: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.$interface>) => Promise< + interface: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$interface<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interface: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interface: $SelectionSet }, Schema<$Context['scalars']>>, 'interface' > > > interfaceNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.interfaceNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.interfaceNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interfaceNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interfaceNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'interfaceNonNull' > > > interfaceWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.interfaceWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.interfaceWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ interfaceWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ interfaceWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'interfaceWithArgs' > > > - listInt: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listInt>) => Promise< + listInt: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listInt<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listInt: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listInt: $SelectionSet }, Schema<$Context['scalars']>>, 'listInt' > > > listIntNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listIntNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listIntNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listIntNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listIntNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'listIntNonNull' > > > - listListInt: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listListInt>) => Promise< + listListInt: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listListInt<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listListInt: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listListInt: $SelectionSet }, Schema<$Context['scalars']>>, 'listListInt' > > > listListIntNonNull: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.listListIntNonNull>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.listListIntNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ listListIntNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ listListIntNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'listListIntNonNull' > > > lowerCaseUnion: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.lowerCaseUnion>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.lowerCaseUnion<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ lowerCaseUnion: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ lowerCaseUnion: $SelectionSet }, Schema<$Context['scalars']>>, 'lowerCaseUnion' > > > - object: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.$object>) => Promise< + object: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$object<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ object: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ object: $SelectionSet }, Schema<$Context['scalars']>>, 'object' > > > - objectList: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectList>) => Promise< + objectList: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectList<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectList: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectList: $SelectionSet }, Schema<$Context['scalars']>>, 'objectList' > > > objectListNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectListNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectListNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectListNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectListNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'objectListNonNull' > > > - objectNested: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectNested>) => Promise< + objectNested: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectNested<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectNested: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectNested: $SelectionSet }, Schema<$Context['scalars']>>, 'objectNested' > > > - objectNonNull: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectNonNull>) => Promise< + objectNonNull: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'objectNonNull' > > > objectWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.objectWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.objectWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ objectWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ objectWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'objectWithArgs' > > > - result: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.result>) => Promise< + result: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.result<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ result: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ result: $SelectionSet }, Schema<$Context['scalars']>>, 'result' > > > - resultNonNull: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.resultNonNull>) => Promise< + resultNonNull: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.resultNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ resultNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ resultNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'resultNonNull' > > > - string: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.$string>) => Promise< + string: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.$string<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ string: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ string: $SelectionSet }, Schema<$Context['scalars']>>, 'string' > > > stringWithArgEnum: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgEnum>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgEnum<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgEnum: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgEnum: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgEnum' > > > stringWithArgInputObject: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObject>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObject<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgInputObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgInputObject: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgInputObject' > > > stringWithArgInputObjectRequired: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgInputObjectRequired>, + selectionSet: $$Utilities.Exact< + $SelectionSet, + SelectionSet.Query.stringWithArgInputObjectRequired<$Context['scalars']> + >, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgInputObjectRequired: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgInputObjectRequired: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgInputObjectRequired' > > @@ -478,108 +529,112 @@ export interface QueryMethods<$Config extends Utils.Config> { * The given arguments are reflected back as a JSON string. */ stringWithArgs: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithArgs>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithArgs' > > > stringWithListArg: <$SelectionSet>( - selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithListArg>, + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithListArg<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithListArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithListArg: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithListArg' > > > stringWithListArgRequired: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithListArgRequired>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithListArgRequired<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithListArgRequired: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithListArgRequired: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithListArgRequired' > > > stringWithRequiredArg: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.stringWithRequiredArg>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.stringWithRequiredArg<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ stringWithRequiredArg: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ stringWithRequiredArg: $SelectionSet }, Schema<$Context['scalars']>>, 'stringWithRequiredArg' > > > - unionFooBar: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBar>) => Promise< + unionFooBar: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBar<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBar: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBar: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBar' > > > unionFooBarNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBarNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBarNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBarNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBarNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBarNonNull' > > > unionFooBarWithArgs: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionFooBarWithArgs>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionFooBarWithArgs<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionFooBarWithArgs: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionFooBarWithArgs: $SelectionSet }, Schema<$Context['scalars']>>, 'unionFooBarWithArgs' > > > - unionObject: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionObject>) => Promise< + unionObject: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionObject<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionObject: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionObject: $SelectionSet }, Schema<$Context['scalars']>>, 'unionObject' > > > unionObjectNonNull: <$SelectionSet>( - selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.unionObjectNonNull>, + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.unionObjectNonNull<$Context['scalars']>>, ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ unionObjectNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ unionObjectNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'unionObjectNonNull' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - mutation: MutationMethods<$Config> - query: QueryMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + mutation: MutationMethods<$Context> + query: QueryMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/Scalar.ts b/tests/_/schemas/kitchen-sink/graffle/modules/Scalar.ts index 8d0fd17a0..cfba77a10 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/Scalar.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/Scalar.ts @@ -1,9 +1,7 @@ -import type { SchemaKit } from '../../../../../../src/entrypoints/schema.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' -import * as CustomScalars from '../../customScalarCodecs.js' +export * from '../../../../../../src/layers/1_Schema/Hybrid/types/Scalar/Scalar.js' -export * from '../../customScalarCodecs.js' -export { Date } from '../../customScalarCodecs.js' // // // @@ -16,11 +14,4 @@ export { Date } from '../../customScalarCodecs.js' // // -export type Date = typeof CustomScalars.Date -// Without this we get error: -// "Exported type alias 'DateDecoded' has or is using private name 'Date'." -type Date_ = typeof CustomScalars.Date -export type DateDecoded = SchemaKit.Scalar.GetDecoded -export type DateEncoded = SchemaKit.Scalar.GetEncoded - -export * from '../../../../../../src/layers/1_Schema/Hybrid/types/Scalar/Scalar.js' +export type Date = $$Utilities.SchemaKit.Scalar.ScalarCodecless<'Date'> diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts b/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts index 9d91c8703..ab3428e8a 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts @@ -306,18 +306,6 @@ export namespace Schema { // // - // todo generate code like this: - export interface DateInterface2 extends $.Interface { - name: 'DateInterface1' - implementors: [DateObject1] - fields: { - date1: { - inlineType: [0] - namedType: $Scalar.Date - } - } - } - export type DateInterface1 = $.Interface<'DateInterface1', { date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> }, [DateObject1]> @@ -381,6 +369,7 @@ export namespace Schema { }> export type Object1 = $.Object$2<'Object1', { + ABCEnum: $.Field<'ABCEnum', $.Output.Nullable, null> boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> @@ -458,11 +447,13 @@ export namespace Schema { // // -import type * as Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Mutation', 'Query'] RootUnion: Schema.Mutation | Schema.Query @@ -523,6 +514,6 @@ export interface Schema extends Utilities.SchemaIndexBase { Error: Schema.Error Interface: Schema.Interface } - customScalars: Utilities.SchemaIndexBase['customScalars'] - extensions: Utilities.GlobalRegistry.TypeExtensions + scalars: $Scalars + extensions: $$Utilities.GlobalRegistry.TypeExtensions } diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/SchemaDrivenDataMap.ts b/tests/_/schemas/kitchen-sink/graffle/modules/SchemaDrivenDataMap.ts index 7b2c3e5c5..f780d455b 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/SchemaDrivenDataMap.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/SchemaDrivenDataMap.ts @@ -42,7 +42,7 @@ const String = $Scalar.String // // -const Date = $Scalar.Date +const Date = 'Date' // // @@ -194,6 +194,7 @@ const Foo: $Utilities.SchemaDrivenDataMap.OutputObject = { const Object1: $Utilities.SchemaDrivenDataMap.OutputObject = { f: { + ABCEnum: {}, boolean: {}, float: {}, id: {}, diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/SelectionSets.ts b/tests/_/schemas/kitchen-sink/graffle/modules/SelectionSets.ts index 4632a1147..722a46bd8 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/SelectionSets.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/SelectionSets.ts @@ -1,5 +1,5 @@ import type { Select as $Select } from '../../../../../../src/entrypoints/schema.js' -import type * as $Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type * as $Scalar from './Scalar.js' // @@ -19,9 +19,9 @@ import type * as $Scalar from './Scalar.js' // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - query?: Record - mutation?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + query?: Record> + mutation?: Record> } // @@ -54,15 +54,15 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Mutation { +export interface Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `id` field on the `Mutation` object. Its type is `ID` (a `Scalar`). */ - id?: Mutation.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Mutation.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `idNonNull` field on the `Mutation` object. Its type is `ID` (a `Scalar`). */ - idNonNull?: Mutation.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Mutation.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -72,7 +72,9 @@ export interface Mutation { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Mutation$FragmentInline | Mutation$FragmentInline[] + ___?: + | Mutation$FragmentInline<$Scalars> + | Mutation$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -84,28 +86,54 @@ export interface Mutation { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Mutation$FragmentInline extends Mutation, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Mutation$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Mutation<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Mutation { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type idNonNull = $Select.Indicator.NoArgsIndicator + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + > } // @@ -122,219 +150,261 @@ export namespace Mutation { // ----------------------------------------| Entrypoint Interface | -export interface Query { +export interface Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `InputObjectNested` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - InputObjectNested?: Query.InputObjectNested$Expanded | $Select.SelectAlias.SelectAlias + InputObjectNested?: + | Query.InputObjectNested$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `InputObjectNestedNonNull` field on the `Query` object. Its type is `ID` (a `Scalar`). */ InputObjectNestedNonNull?: - | Query.InputObjectNestedNonNull - | $Select.SelectAlias.SelectAlias + | Query.InputObjectNestedNonNull<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `abcEnum` field on the `Query` object. Its type is Enum. */ - abcEnum?: Query.abcEnum$Expanded | $Select.SelectAlias.SelectAlias + abcEnum?: Query.abcEnum$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `argInputObjectCircular` field on the `Query` object. Its type is `String` (a `Scalar`). */ argInputObjectCircular?: - | Query.argInputObjectCircular$Expanded - | $Select.SelectAlias.SelectAlias + | Query.argInputObjectCircular$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `date` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - date?: Query.date$Expanded | $Select.SelectAlias.SelectAlias + date?: Query.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArg` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArg?: Query.dateArg$Expanded | $Select.SelectAlias.SelectAlias + dateArg?: Query.dateArg$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgInputObject` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgInputObject?: Query.dateArgInputObject$Expanded | $Select.SelectAlias.SelectAlias + dateArgInputObject?: + | Query.dateArgInputObject$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgList?: Query.dateArgList$Expanded | $Select.SelectAlias.SelectAlias + dateArgList?: Query.dateArgList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgNonNull?: Query.dateArgNonNull | $Select.SelectAlias.SelectAlias + dateArgNonNull?: Query.dateArgNonNull<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgNonNullList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateArgNonNullList?: Query.dateArgNonNullList | $Select.SelectAlias.SelectAlias + dateArgNonNullList?: + | Query.dateArgNonNullList<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateArgNonNullListNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ dateArgNonNullListNonNull?: - | Query.dateArgNonNullListNonNull - | $Select.SelectAlias.SelectAlias + | Query.dateArgNonNullListNonNull<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateInterface1` field on the `Query` object. Its type is Interface. */ - dateInterface1?: Query.dateInterface1$Expanded | $Select.SelectAlias.SelectAlias + dateInterface1?: + | Query.dateInterface1$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateList?: Query.dateList$Expanded | $Select.SelectAlias.SelectAlias + dateList?: Query.dateList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateListList` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateListList?: Query.dateListList$Expanded | $Select.SelectAlias.SelectAlias + dateListList?: Query.dateListList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateListNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateListNonNull?: Query.dateListNonNull$Expanded | $Select.SelectAlias.SelectAlias + dateListNonNull?: + | Query.dateListNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `dateNonNull` field on the `Query` object. Its type is `Date` (a `Scalar`). */ - dateNonNull?: Query.dateNonNull$Expanded | $Select.SelectAlias.SelectAlias + dateNonNull?: Query.dateNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateObject1` field on the `Query` object. Its type is Object. */ - dateObject1?: Query.dateObject1$Expanded | $Select.SelectAlias.SelectAlias + dateObject1?: Query.dateObject1$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `dateUnion` field on the `Query` object. Its type is Union. */ - dateUnion?: Query.dateUnion$Expanded | $Select.SelectAlias.SelectAlias + dateUnion?: Query.dateUnion$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `error` field on the `Query` object. Its type is `String` (a `Scalar`). */ - error?: Query.error$Expanded | $Select.SelectAlias.SelectAlias + error?: Query.error$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - id?: Query.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Query.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `idNonNull` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - idNonNull?: Query.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Query.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `interface` field on the `Query` object. Its type is Interface. */ - interface?: Query.$interface$Expanded | $Select.SelectAlias.SelectAlias + interface?: Query.$interface$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `interfaceNonNull` field on the `Query` object. Its type is Interface. */ - interfaceNonNull?: Query.interfaceNonNull$Expanded | $Select.SelectAlias.SelectAlias + interfaceNonNull?: + | Query.interfaceNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `interfaceWithArgs` field on the `Query` object. Its type is Interface. */ - interfaceWithArgs?: Query.interfaceWithArgs | $Select.SelectAlias.SelectAlias + interfaceWithArgs?: + | Query.interfaceWithArgs<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `listInt` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listInt?: Query.listInt$Expanded | $Select.SelectAlias.SelectAlias + listInt?: Query.listInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `listIntNonNull` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listIntNonNull?: Query.listIntNonNull$Expanded | $Select.SelectAlias.SelectAlias + listIntNonNull?: + | Query.listIntNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `listListInt` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listListInt?: Query.listListInt$Expanded | $Select.SelectAlias.SelectAlias + listListInt?: Query.listListInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `listListIntNonNull` field on the `Query` object. Its type is `Int` (a `Scalar`). */ - listListIntNonNull?: Query.listListIntNonNull$Expanded | $Select.SelectAlias.SelectAlias + listListIntNonNull?: + | Query.listListIntNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `lowerCaseUnion` field on the `Query` object. Its type is Union. */ - lowerCaseUnion?: Query.lowerCaseUnion$Expanded | $Select.SelectAlias.SelectAlias + lowerCaseUnion?: + | Query.lowerCaseUnion$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `object` field on the `Query` object. Its type is Object. */ - object?: Query.$object$Expanded | $Select.SelectAlias.SelectAlias + object?: Query.$object$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `objectList` field on the `Query` object. Its type is Object. */ - objectList?: Query.objectList$Expanded | $Select.SelectAlias.SelectAlias + objectList?: Query.objectList$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `objectListNonNull` field on the `Query` object. Its type is Object. */ - objectListNonNull?: Query.objectListNonNull$Expanded | $Select.SelectAlias.SelectAlias + objectListNonNull?: + | Query.objectListNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `objectNested` field on the `Query` object. Its type is Object. */ - objectNested?: Query.objectNested$Expanded | $Select.SelectAlias.SelectAlias + objectNested?: Query.objectNested$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `objectNonNull` field on the `Query` object. Its type is Object. */ - objectNonNull?: Query.objectNonNull$Expanded | $Select.SelectAlias.SelectAlias + objectNonNull?: + | Query.objectNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `objectWithArgs` field on the `Query` object. Its type is Object. */ - objectWithArgs?: Query.objectWithArgs$Expanded | $Select.SelectAlias.SelectAlias + objectWithArgs?: + | Query.objectWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `result` field on the `Query` object. Its type is Union. */ - result?: Query.result | $Select.SelectAlias.SelectAlias + result?: Query.result<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `resultNonNull` field on the `Query` object. Its type is Union. */ - resultNonNull?: Query.resultNonNull$Expanded | $Select.SelectAlias.SelectAlias + resultNonNull?: + | Query.resultNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `string` field on the `Query` object. Its type is `String` (a `Scalar`). */ - string?: Query.$string$Expanded | $Select.SelectAlias.SelectAlias + string?: Query.$string$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgEnum` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithArgEnum?: Query.stringWithArgEnum$Expanded | $Select.SelectAlias.SelectAlias + stringWithArgEnum?: + | Query.stringWithArgEnum$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgInputObject` field on the `Query` object. Its type is `String` (a `Scalar`). */ stringWithArgInputObject?: - | Query.stringWithArgInputObject$Expanded - | $Select.SelectAlias.SelectAlias + | Query.stringWithArgInputObject$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgInputObjectRequired` field on the `Query` object. Its type is `String` (a `Scalar`). */ stringWithArgInputObjectRequired?: - | Query.stringWithArgInputObjectRequired - | $Select.SelectAlias.SelectAlias + | Query.stringWithArgInputObjectRequired<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithArgs` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithArgs?: Query.stringWithArgs$Expanded | $Select.SelectAlias.SelectAlias + stringWithArgs?: + | Query.stringWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithListArg` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithListArg?: Query.stringWithListArg$Expanded | $Select.SelectAlias.SelectAlias + stringWithListArg?: + | Query.stringWithListArg$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithListArgRequired` field on the `Query` object. Its type is `String` (a `Scalar`). */ stringWithListArgRequired?: - | Query.stringWithListArgRequired - | $Select.SelectAlias.SelectAlias + | Query.stringWithListArgRequired<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `stringWithRequiredArg` field on the `Query` object. Its type is `String` (a `Scalar`). */ - stringWithRequiredArg?: Query.stringWithRequiredArg | $Select.SelectAlias.SelectAlias + stringWithRequiredArg?: + | Query.stringWithRequiredArg<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `unionFooBar` field on the `Query` object. Its type is Union. */ - unionFooBar?: Query.unionFooBar$Expanded | $Select.SelectAlias.SelectAlias + unionFooBar?: Query.unionFooBar$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `unionFooBarNonNull` field on the `Query` object. Its type is Union. */ - unionFooBarNonNull?: Query.unionFooBarNonNull$Expanded | $Select.SelectAlias.SelectAlias + unionFooBarNonNull?: + | Query.unionFooBarNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `unionFooBarWithArgs` field on the `Query` object. Its type is Union. */ - unionFooBarWithArgs?: Query.unionFooBarWithArgs$Expanded | $Select.SelectAlias.SelectAlias + unionFooBarWithArgs?: + | Query.unionFooBarWithArgs$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `unionObject` field on the `Query` object. Its type is Object. */ - unionObject?: Query.unionObject$Expanded | $Select.SelectAlias.SelectAlias + unionObject?: Query.unionObject$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `unionObjectNonNull` field on the `Query` object. Its type is Object. */ - unionObjectNonNull?: Query.unionObjectNonNull$Expanded | $Select.SelectAlias.SelectAlias + unionObjectNonNull?: + | Query.unionObjectNonNull$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -344,7 +414,9 @@ export interface Query { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Query$FragmentInline | Query$FragmentInline[] + ___?: + | Query$FragmentInline<$Scalars> + | Query$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -356,527 +428,1327 @@ export interface Query { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Query$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Query<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Query { - export type InputObjectNested$SelectionSetArguments = { - input?: _RefDefs._InputObjectNested | undefined | null + export type InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | InputObjectNested$SelectionSet<$Scalars> + + export interface InputObjectNested$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `InputObjectNested` field. No arguments are required so you may omit this. + */ + $?: InputObjectNested$Arguments<$Scalars> } - export type InputObjectNested$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `InputObjectNested` field. - * No arguments are required so you may omit this. - */ - $?: InputObjectNested$SelectionSetArguments - } - > + + export interface InputObjectNested$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObjectNested<$Scalars> | undefined | null + } + + // --- expanded --- /** * This is the "expanded" version of the `InputObjectNested` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type InputObjectNested$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | InputObjectNested$SelectionSet - > + export type InputObjectNested$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | InputObjectNested$SelectionSet<$Scalars> + > - export type InputObjectNested = $Select.Indicator.Indicator | InputObjectNested$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type InputObjectNestedNonNull$SelectionSetArguments = { - input: _RefDefs._InputObjectNestedNonNull - } - export interface InputObjectNestedNonNull extends $Select.Bases.Base { + export type InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + InputObjectNestedNonNull$SelectionSet<$Scalars> + + export interface InputObjectNestedNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `InputObjectNestedNonNull` field. - * All arguments are required so you must include this. + * Arguments for `InputObjectNestedNonNull` field. All arguments are required so you must include this. */ - $: InputObjectNestedNonNull$SelectionSetArguments + $: InputObjectNestedNonNull$Arguments<$Scalars> } + export interface InputObjectNestedNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input: $NamedTypes.$InputObjectNestedNonNull<$Scalars> + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `InputObjectNestedNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type InputObjectNestedNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + InputObjectNestedNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type abcEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | abcEnum$SelectionSet<$Scalars> + + export interface abcEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `abcEnum` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type abcEnum$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type abcEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | abcEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type argInputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | argInputObjectCircular$SelectionSet<$Scalars> - export type abcEnum = $Select.Indicator.NoArgsIndicator + export interface argInputObjectCircular$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `argInputObjectCircular` field. No arguments are required so you may omit this. + */ + $?: argInputObjectCircular$Arguments<$Scalars> + } - export type argInputObjectCircular$SelectionSetArguments = { - input?: _RefDefs._InputObjectCircular | undefined | null + export interface argInputObjectCircular$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObjectCircular<$Scalars> | undefined | null } - export type argInputObjectCircular$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `argInputObjectCircular` field. - * No arguments are required so you may omit this. - */ - $?: argInputObjectCircular$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `argInputObjectCircular` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type argInputObjectCircular$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | argInputObjectCircular$SelectionSet - > + export type argInputObjectCircular$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | argInputObjectCircular$SelectionSet<$Scalars> + > - export type argInputObjectCircular = $Select.Indicator.Indicator | argInputObjectCircular$SelectionSet + // -------------------------------------------------------------------------------------------------- + + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArg$SelectionSet<$Scalars> - export type date = $Select.Indicator.NoArgsIndicator + export interface dateArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `dateArg` field. No arguments are required so you may omit this. + */ + $?: dateArg$Arguments<$Scalars> + } - export type dateArg$SelectionSetArguments = { - date?: $Scalar.DateDecoded | undefined | null + export interface dateArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null } - export type dateArg$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `dateArg` field. - * No arguments are required so you may omit this. - */ - $?: dateArg$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `dateArg` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArg$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | dateArg$SelectionSet> + export type dateArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArg$SelectionSet<$Scalars> + > - export type dateArg = $Select.Indicator.Indicator | dateArg$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type dateArgInputObject$SelectionSetArguments = { - input?: _RefDefs._InputObject | undefined | null + export type dateArgInputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArgInputObject$SelectionSet<$Scalars> + + export interface dateArgInputObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `dateArgInputObject` field. No arguments are required so you may omit this. + */ + $?: dateArgInputObject$Arguments<$Scalars> + } + + export interface dateArgInputObject$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObject<$Scalars> | undefined | null } - export type dateArgInputObject$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `dateArgInputObject` field. - * No arguments are required so you may omit this. - */ - $?: dateArgInputObject$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `dateArgInputObject` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArgInputObject$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | dateArgInputObject$SelectionSet - > + export type dateArgInputObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArgInputObject$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type dateArgInputObject = $Select.Indicator.Indicator | dateArgInputObject$SelectionSet + export type dateArgList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateArgList$SelectionSet<$Scalars> - export type dateArgList$SelectionSetArguments = { - date?: Array<$Scalar.DateDecoded | undefined | null> | undefined | null + export interface dateArgList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `dateArgList` field. No arguments are required so you may omit this. + */ + $?: dateArgList$Arguments<$Scalars> } - export type dateArgList$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `dateArgList` field. - * No arguments are required so you may omit this. - */ - $?: dateArgList$SelectionSetArguments - } - > + + export interface dateArgList$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > + | undefined + | null + } + + // --- expanded --- /** * This is the "expanded" version of the `dateArgList` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateArgList$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | dateArgList$SelectionSet> + export type dateArgList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateArgList$SelectionSet<$Scalars> + > - export type dateArgList = $Select.Indicator.Indicator | dateArgList$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type dateArgNonNull$SelectionSetArguments = { - date: $Scalar.DateDecoded - } - export interface dateArgNonNull extends $Select.Bases.Base { + export type dateArgNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNull$SelectionSet<$Scalars> + + export interface dateArgNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `dateArgNonNull` field. - * All arguments are required so you must include this. + * Arguments for `dateArgNonNull` field. All arguments are required so you must include this. */ - $: dateArgNonNull$SelectionSetArguments + $: dateArgNonNull$Arguments<$Scalars> } - export type dateArgNonNullList$SelectionSetArguments = { - date: Array<$Scalar.DateDecoded | undefined | null> + export interface dateArgNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > } - export interface dateArgNonNullList extends $Select.Bases.Base { + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateArgNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateArgNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateArgNonNullList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNullList$SelectionSet<$Scalars> + + export interface dateArgNonNullList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `dateArgNonNullList` field. - * All arguments are required so you must include this. + * Arguments for `dateArgNonNullList` field. All arguments are required so you must include this. */ - $: dateArgNonNullList$SelectionSetArguments + $: dateArgNonNullList$Arguments<$Scalars> } - export type dateArgNonNullListNonNull$SelectionSetArguments = { - date: Array<$Scalar.DateDecoded | undefined | null> + export interface dateArgNonNullList$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > } - export interface dateArgNonNullListNonNull extends $Select.Bases.Base { + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateArgNonNullList` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateArgNonNullList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNullList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateArgNonNullListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateArgNonNullListNonNull$SelectionSet<$Scalars> + + export interface dateArgNonNullListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `dateArgNonNullListNonNull` field. - * All arguments are required so you must include this. + * Arguments for `dateArgNonNullListNonNull` field. All arguments are required so you must include this. */ - $: dateArgNonNullListNonNull$SelectionSetArguments + $: dateArgNonNullListNonNull$Arguments<$Scalars> } - export interface dateInterface1 extends _RefDefs._DateInterface1 {} - export type dateInterface1$Expanded = dateInterface1 + export interface dateArgNonNullListNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date: Array< + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + > + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateArgNonNullListNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateArgNonNullListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateArgNonNullListNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + dateInterface1$SelectionSet<$Scalars> + + export interface dateInterface1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateInterface1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateInterface1` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateInterface1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + dateInterface1$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateList$SelectionSet<$Scalars> + + export interface dateList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `dateList` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateList$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateListList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateListList$SelectionSet<$Scalars> - export type dateList = $Select.Indicator.NoArgsIndicator + export interface dateListList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `dateListList` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateListList$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateListList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateListList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateListNonNull$SelectionSet<$Scalars> - export type dateListList = $Select.Indicator.NoArgsIndicator + export interface dateListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `dateListNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateListNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateListNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | dateNonNull$SelectionSet<$Scalars> - export type dateListNonNull = $Select.Indicator.NoArgsIndicator + export interface dateNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `dateNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type dateNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type dateNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | dateNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = dateObject1$SelectionSet< + $Scalars + > + + export interface dateObject1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateObject1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateObject1` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateObject1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + dateObject1$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type dateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = dateUnion$SelectionSet<$Scalars> + + export interface dateUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$DateUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `dateUnion` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type dateUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + dateUnion$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type dateNonNull = $Select.Indicator.NoArgsIndicator + export type error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | error$SelectionSet<$Scalars> - export interface dateObject1 extends _RefDefs._DateObject1 {} - export type dateObject1$Expanded = dateObject1 - export interface dateUnion extends _RefDefs._DateUnion {} - export type dateUnion$Expanded = dateUnion - export type error$SelectionSetArguments = { + export interface error$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `error` field. No arguments are required so you may omit this. + */ + $?: error$Arguments<$Scalars> + } + + export interface error$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { case?: string | undefined | null } - export type error$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `error` field. - * No arguments are required so you may omit this. - */ - $?: error$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `error` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type error$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | error$SelectionSet> + export type error$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | error$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> - export type error = $Select.Indicator.Indicator | error$SelectionSet + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $interface$SelectionSet< + $Scalars + > + + export interface $interface$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `$interface` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $interface$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $interface$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type interfaceNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + interfaceNonNull$SelectionSet<$Scalars> + + export interface interfaceNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `interfaceNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type interfaceNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + interfaceNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type interfaceWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + interfaceWithArgs$SelectionSet<$Scalars> + + export interface interfaceWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Interface<$Scalars> + { + /** + * Arguments for `interfaceWithArgs` field. All arguments are required so you must include this. + */ + $: interfaceWithArgs$Arguments<$Scalars> + } + + export interface interfaceWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + id: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `interfaceWithArgs` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type interfaceWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + interfaceWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listInt$SelectionSet<$Scalars> + + export interface listInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listInt` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listInt$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listIntNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listIntNonNull$SelectionSet<$Scalars> + + export interface listIntNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listIntNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listIntNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listIntNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listListInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listListInt$SelectionSet<$Scalars> + + export interface listListInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listListInt` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listListInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listListInt$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type listListIntNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | listListIntNonNull$SelectionSet<$Scalars> + + export interface listListIntNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `listListIntNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type listListIntNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | listListIntNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + lowerCaseUnion$SelectionSet<$Scalars> + + export interface lowerCaseUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$lowerCaseUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `lowerCaseUnion` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type lowerCaseUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + lowerCaseUnion$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $object<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $object$SelectionSet<$Scalars> + + export interface $object$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `$object` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $object$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $object$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectList<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectList$SelectionSet< + $Scalars + > + + export interface objectList$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectList` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectList$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + objectList$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectListNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + objectListNonNull$SelectionSet<$Scalars> + + export interface objectListNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectListNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectListNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectListNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectNested$SelectionSet< + $Scalars + > + + export interface objectNested$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectNested<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectNested` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectNested$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectNested$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = objectNonNull$SelectionSet< + $Scalars + > + + export interface objectNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type objectWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + objectWithArgs$SelectionSet<$Scalars> + + export interface objectWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + { + /** + * Arguments for `objectWithArgs` field. No arguments are required so you may omit this. + */ + $?: objectWithArgs$Arguments<$Scalars> + } + + export interface objectWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + boolean?: boolean | undefined | null + float?: number | undefined | null + id?: string | undefined | null + int?: number | undefined | null + string?: string | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `objectWithArgs` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type objectWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + objectWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = result$SelectionSet<$Scalars> + + export interface result$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Result<$Scalars> + { + /** + * Arguments for `result` field. All arguments are required so you must include this. + */ + $: result$Arguments<$Scalars> + } + + export interface result$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $case: $NamedTypes.$Case + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `result` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type result$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + result$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type resultNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = resultNonNull$SelectionSet< + $Scalars + > + + export interface resultNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Result<$Scalars> + { + /** + * Arguments for `resultNonNull` field. No arguments are required so you may omit this. + */ + $?: resultNonNull$Arguments<$Scalars> + } + + export interface resultNonNull$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $case?: $NamedTypes.$Case | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `resultNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type resultNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + resultNonNull$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $string<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + + export interface $string$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `$string` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $string$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgEnum$SelectionSet<$Scalars> + + export interface stringWithArgEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithArgEnum` field. No arguments are required so you may omit this. + */ + $?: stringWithArgEnum$Arguments<$Scalars> + } + + export interface stringWithArgEnum$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + $ABCEnum?: $NamedTypes.$ABCEnum | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `stringWithArgEnum` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type stringWithArgEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgInputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgInputObject$SelectionSet<$Scalars> + + export interface stringWithArgInputObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithArgInputObject` field. No arguments are required so you may omit this. + */ + $?: stringWithArgInputObject$Arguments<$Scalars> + } + + export interface stringWithArgInputObject$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + input?: $NamedTypes.$InputObject<$Scalars> | undefined | null + } - export type id = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithArgInputObject` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithArgInputObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgInputObject$SelectionSet<$Scalars> + > - export type idNonNull = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export interface $interface extends _RefDefs._Interface {} - export type $interface$Expanded = $interface - export interface interfaceNonNull extends _RefDefs._Interface {} - export type interfaceNonNull$Expanded = interfaceNonNull - export interface interfaceWithArgs extends _RefDefs._Interface { + export type stringWithArgInputObjectRequired<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithArgInputObjectRequired$SelectionSet<$Scalars> + + export interface stringWithArgInputObjectRequired$SelectionSet< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, + > extends $Select.Bases.Base { /** - * Arguments for `interfaceWithArgs` field. - * All arguments are required so you must include this. + * Arguments for `stringWithArgInputObjectRequired` field. All arguments are required so you must include this. */ - $: { - id: string - } + $: stringWithArgInputObjectRequired$Arguments<$Scalars> + } + + export interface stringWithArgInputObjectRequired$Arguments< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, + > { + input: $NamedTypes.$InputObject<$Scalars> } - export type interfaceWithArgs$Expanded = interfaceWithArgs + + // --- expanded --- + /** - * This is the "expanded" version of the `listInt` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithArgInputObjectRequired` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithArgInputObjectRequired$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithArgInputObjectRequired$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithArgs$SelectionSet<$Scalars> + + export interface stringWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithArgs` field. No arguments are required so you may omit this. + */ + $?: stringWithArgs$Arguments<$Scalars> + } + + export interface stringWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + boolean?: boolean | undefined | null + float?: number | undefined | null + id?: string | undefined | null + int?: number | undefined | null + string?: string | undefined | null + } - export type listInt = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the `listIntNonNull` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithArgs` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listIntNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithArgs$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithListArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | stringWithListArg$SelectionSet<$Scalars> + + export interface stringWithListArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithListArg` field. No arguments are required so you may omit this. + */ + $?: stringWithListArg$Arguments<$Scalars> + } + + export interface stringWithListArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ints?: Array | undefined | null + } - export type listIntNonNull = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** - * This is the "expanded" version of the `listListInt` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithListArg` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listListInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithListArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | stringWithListArg$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type stringWithListArgRequired<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithListArgRequired$SelectionSet<$Scalars> + + export interface stringWithListArgRequired$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `stringWithListArgRequired` field. All arguments are required so you must include this. + */ + $: stringWithListArgRequired$Arguments<$Scalars> + } - export type listListInt = $Select.Indicator.NoArgsIndicator + export interface stringWithListArgRequired$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ints: Array + } + + // --- expanded --- /** - * This is the "expanded" version of the `listListIntNonNull` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithListArgRequired` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type listListIntNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithListArgRequired$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithListArgRequired$SelectionSet<$Scalars> + > - export type listListIntNonNull = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export interface lowerCaseUnion extends _RefDefs._lowerCaseUnion {} - export type lowerCaseUnion$Expanded = lowerCaseUnion - export interface $object extends _RefDefs._Object1 {} - export type $object$Expanded = $object - export interface objectList extends _RefDefs._Object1 {} - export type objectList$Expanded = objectList - export interface objectListNonNull extends _RefDefs._Object1 {} - export type objectListNonNull$Expanded = objectListNonNull - export interface objectNested extends _RefDefs._ObjectNested {} - export type objectNested$Expanded = objectNested - export interface objectNonNull extends _RefDefs._Object1 {} - export type objectNonNull$Expanded = objectNonNull - export interface objectWithArgs extends _RefDefs._Object1 { - /** - * Arguments for `objectWithArgs` field. - * No arguments are required so you may omit this. - */ - $?: { - boolean?: boolean | undefined | null - float?: number | undefined | null - id?: string | undefined | null - int?: number | undefined | null - string?: string | undefined | null - } - } - export type objectWithArgs$Expanded = objectWithArgs - export interface result extends _RefDefs._Result { + export type stringWithRequiredArg<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + stringWithRequiredArg$SelectionSet<$Scalars> + + export interface stringWithRequiredArg$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { /** - * Arguments for `result` field. - * All arguments are required so you must include this. + * Arguments for `stringWithRequiredArg` field. All arguments are required so you must include this. */ - $: { - $case: _RefDefs._Case - } + $: stringWithRequiredArg$Arguments<$Scalars> } - export type result$Expanded = result - export interface resultNonNull extends _RefDefs._Result { - /** - * Arguments for `resultNonNull` field. - * No arguments are required so you may omit this. - */ - $?: { - $case?: _RefDefs._Case | undefined | null - } + + export interface stringWithRequiredArg$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + string: string } - export type resultNonNull$Expanded = resultNonNull + + // --- expanded --- + /** - * This is the "expanded" version of the `$string` type. It is identical except for the fact + * This is the "expanded" version of the `stringWithRequiredArg` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $string$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type stringWithRequiredArg$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + stringWithRequiredArg$SelectionSet<$Scalars> + > - export type $string = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export type stringWithArgEnum$SelectionSetArguments = { - $ABCEnum?: _RefDefs._ABCEnum | undefined | null - } - export type stringWithArgEnum$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithArgEnum` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgEnum$SelectionSetArguments - } + export type unionFooBar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = unionFooBar$SelectionSet< + $Scalars > + export interface unionFooBar$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- + /** - * This is the "expanded" version of the `stringWithArgEnum` type. It is identical except for the fact + * This is the "expanded" version of the `unionFooBar` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgEnum$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgEnum$SelectionSet + export type unionFooBar$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + unionFooBar$SelectionSet<$Scalars> > - export type stringWithArgEnum = $Select.Indicator.Indicator | stringWithArgEnum$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithArgInputObject$SelectionSetArguments = { - input?: _RefDefs._InputObject | undefined | null - } - export type stringWithArgInputObject$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithArgInputObject` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgInputObject$SelectionSetArguments - } - > + export type unionFooBarNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionFooBarNonNull$SelectionSet<$Scalars> + + export interface unionFooBarNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- /** - * This is the "expanded" version of the `stringWithArgInputObject` type. It is identical except for the fact + * This is the "expanded" version of the `unionFooBarNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgInputObject$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgInputObject$SelectionSet - > + export type unionFooBarNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionFooBarNonNull$SelectionSet<$Scalars> + > - export type stringWithArgInputObject = $Select.Indicator.Indicator | stringWithArgInputObject$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithArgInputObjectRequired$SelectionSetArguments = { - input: _RefDefs._InputObject - } - export interface stringWithArgInputObjectRequired extends $Select.Bases.Base { + export type unionFooBarWithArgs<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionFooBarWithArgs$SelectionSet<$Scalars> + + export interface unionFooBarWithArgs$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + { /** - * Arguments for `stringWithArgInputObjectRequired` field. - * All arguments are required so you must include this. + * Arguments for `unionFooBarWithArgs` field. No arguments are required so you may omit this. */ - $: stringWithArgInputObjectRequired$SelectionSetArguments + $?: unionFooBarWithArgs$Arguments<$Scalars> } - export type stringWithArgs$SelectionSetArguments = { - boolean?: boolean | undefined | null - float?: number | undefined | null + export interface unionFooBarWithArgs$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { id?: string | undefined | null - int?: number | undefined | null - string?: string | undefined | null } - export type stringWithArgs$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithArgs` field. - * No arguments are required so you may omit this. - */ - $?: stringWithArgs$SelectionSetArguments - } - > + + // --- expanded --- /** - * This is the "expanded" version of the `stringWithArgs` type. It is identical except for the fact + * This is the "expanded" version of the `unionFooBarWithArgs` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithArgs$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithArgs$SelectionSet - > + export type unionFooBarWithArgs$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionFooBarWithArgs$SelectionSet<$Scalars> + > - export type stringWithArgs = $Select.Indicator.Indicator | stringWithArgs$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithListArg$SelectionSetArguments = { - ints?: Array | undefined | null - } - export type stringWithListArg$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `stringWithListArg` field. - * No arguments are required so you may omit this. - */ - $?: stringWithListArg$SelectionSetArguments - } + export type unionObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = unionObject$SelectionSet< + $Scalars > + export interface unionObject$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectUnion<$Scalars> + {} + + // --- expanded --- + /** - * This is the "expanded" version of the `stringWithListArg` type. It is identical except for the fact + * This is the "expanded" version of the `unionObject` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type stringWithListArg$Expanded = $Utilities.UnionExpanded< - $Select.Indicator.Indicator | stringWithListArg$SelectionSet + export type unionObject$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + unionObject$SelectionSet<$Scalars> > - export type stringWithListArg = $Select.Indicator.Indicator | stringWithListArg$SelectionSet + // -------------------------------------------------------------------------------------------------- - export type stringWithListArgRequired$SelectionSetArguments = { - ints: Array - } - export interface stringWithListArgRequired extends $Select.Bases.Base { - /** - * Arguments for `stringWithListArgRequired` field. - * All arguments are required so you must include this. - */ - $: stringWithListArgRequired$SelectionSetArguments - } + export type unionObjectNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + unionObjectNonNull$SelectionSet<$Scalars> - export type stringWithRequiredArg$SelectionSetArguments = { - string: string - } - export interface stringWithRequiredArg extends $Select.Bases.Base { - /** - * Arguments for `stringWithRequiredArg` field. - * All arguments are required so you must include this. - */ - $: stringWithRequiredArg$SelectionSetArguments - } + export interface unionObjectNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$ObjectUnion<$Scalars> + {} - export interface unionFooBar extends _RefDefs._FooBarUnion {} - export type unionFooBar$Expanded = unionFooBar - export interface unionFooBarNonNull extends _RefDefs._FooBarUnion {} - export type unionFooBarNonNull$Expanded = unionFooBarNonNull - export interface unionFooBarWithArgs extends _RefDefs._FooBarUnion { - /** - * Arguments for `unionFooBarWithArgs` field. - * No arguments are required so you may omit this. - */ - $?: { - id?: string | undefined | null - } - } - export type unionFooBarWithArgs$Expanded = unionFooBarWithArgs - export interface unionObject extends _RefDefs._ObjectUnion {} - export type unionObject$Expanded = unionObject - export interface unionObjectNonNull extends _RefDefs._ObjectUnion {} - export type unionObjectNonNull$Expanded = unionObjectNonNull + // --- expanded --- + + /** + * This is the "expanded" version of the `unionObjectNonNull` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type unionObjectNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + unionObjectNonNull$SelectionSet<$Scalars> + > } // @@ -923,24 +1795,36 @@ export type Case = 'ErrorOne' | 'ErrorTwo' | 'Object1' // // -export interface InputObject { - date?: $Scalar.DateDecoded | undefined | null - dateRequired: $Scalar.DateDecoded +export interface InputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null + dateRequired: $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > id?: string | undefined | null idRequired: string } -export interface InputObjectCircular { - circular?: _RefDefs._InputObjectCircular | undefined | null - date?: $Scalar.DateDecoded | undefined | null +export interface InputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + circular?: $NamedTypes.$InputObjectCircular<$Scalars> | undefined | null + date?: + | $$Utilities.SchemaKit.Scalar.GetDecoded< + $$Utilities.SchemaKit.Scalar.LookupCustomScalarOrFallbackToString<'Date', $Scalars> + > + | undefined + | null } -export interface InputObjectNested { - InputObject?: _RefDefs._InputObject | undefined | null +export interface InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + InputObject?: $NamedTypes.$InputObject<$Scalars> | undefined | null } -export interface InputObjectNestedNonNull { - InputObject: _RefDefs._InputObject +export interface InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + InputObject: $NamedTypes.$InputObject<$Scalars> } // @@ -959,13 +1843,14 @@ export interface InputObjectNestedNonNull { // // -// -------------- -// Interface Type DateInterface1 -// -------------- +// Interface Type: DateInterface1 +// -------------------------------------------------------------------------------------------------- -export interface DateInterface1 extends $Select.Bases.ObjectLike { - date1?: DateInterface1.date1 - ___on_DateObject1?: DateObject1 +export interface DateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + date1?: DateInterface1.date1<$Scalars> + ___on_DateObject1?: DateObject1<$Scalars> /** * Inline fragments for field groups. @@ -975,7 +1860,9 @@ export interface DateInterface1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateInterface1$FragmentInline | DateInterface1$FragmentInline[] + ___?: + | DateInterface1$FragmentInline<$Scalars> + | DateInterface1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -988,29 +1875,39 @@ export interface DateInterface1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateInterface1$FragmentInline - extends DateInterface1, $Select.Directive.$Groups.InlineFragment.Fields +export interface DateInterface1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateInterface1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} export namespace DateInterface1 { + export type date1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + + export interface date1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date1` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date1$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date1 = $Select.Indicator.NoArgsIndicator + export type date1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + > } -// -------------- -// Interface Type Error -// -------------- +// Interface Type: Error +// -------------------------------------------------------------------------------------------------- -export interface Error extends $Select.Bases.ObjectLike { - message?: Error.message - ___on_ErrorOne?: ErrorOne - ___on_ErrorTwo?: ErrorTwo +export interface Error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { + message?: Error.message<$Scalars> + ___on_ErrorOne?: ErrorOne<$Scalars> + ___on_ErrorTwo?: ErrorTwo<$Scalars> /** * Inline fragments for field groups. @@ -1020,7 +1917,9 @@ export interface Error extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Error$FragmentInline | Error$FragmentInline[] + ___?: + | Error$FragmentInline<$Scalars> + | Error$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -1033,27 +1932,41 @@ export interface Error extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Error$FragmentInline extends Error, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Error$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Error<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Error { + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `message` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } -// -------------- -// Interface Type Interface -// -------------- +// Interface Type: Interface +// -------------------------------------------------------------------------------------------------- -export interface Interface extends $Select.Bases.ObjectLike { - id?: Interface.id - ___on_Object1ImplementingInterface?: Object1ImplementingInterface - ___on_Object2ImplementingInterface?: Object2ImplementingInterface +export interface Interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + id?: Interface.id<$Scalars> + ___on_Object1ImplementingInterface?: Object1ImplementingInterface<$Scalars> + ___on_Object2ImplementingInterface?: Object2ImplementingInterface<$Scalars> /** * Inline fragments for field groups. @@ -1063,7 +1976,9 @@ export interface Interface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Interface$FragmentInline | Interface$FragmentInline[] + ___?: + | Interface$FragmentInline<$Scalars> + | Interface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -1076,17 +1991,30 @@ export interface Interface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Interface$FragmentInline extends Interface, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Interface$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Interface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Interface { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1119,11 +2047,11 @@ export namespace Interface { // ----------------------------------------| Entrypoint Interface | -export interface Bar extends $Select.Bases.ObjectLike { +export interface Bar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the `int` field on the `Bar` object. Its type is `Int` (a `Scalar`). */ - int?: Bar.int$Expanded | $Select.SelectAlias.SelectAlias + int?: Bar.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1133,7 +2061,9 @@ export interface Bar extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Bar$FragmentInline | Bar$FragmentInline[] + ___?: + | Bar$FragmentInline<$Scalars> + | Bar$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1145,19 +2075,32 @@ export interface Bar extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Bar$FragmentInline extends Bar, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Bar$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Bar<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Bar { + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -1174,11 +2117,13 @@ export namespace Bar { // ----------------------------------------| Entrypoint Interface | -export interface DateObject1 extends $Select.Bases.ObjectLike { +export interface DateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `date1` field on the `DateObject1` object. Its type is `Date` (a `Scalar`). */ - date1?: DateObject1.date1$Expanded | $Select.SelectAlias.SelectAlias + date1?: DateObject1.date1$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1188,7 +2133,9 @@ export interface DateObject1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateObject1$FragmentInline | DateObject1$FragmentInline[] + ___?: + | DateObject1$FragmentInline<$Scalars> + | DateObject1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1200,19 +2147,32 @@ export interface DateObject1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateObject1$FragmentInline extends DateObject1, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateObject1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateObject1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace DateObject1 { + export type date1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + + export interface date1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date1` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date1$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date1 = $Select.Indicator.NoArgsIndicator + export type date1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date1$SelectionSet<$Scalars> + > } // @@ -1229,11 +2189,13 @@ export namespace DateObject1 { // ----------------------------------------| Entrypoint Interface | -export interface DateObject2 extends $Select.Bases.ObjectLike { +export interface DateObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `date2` field on the `DateObject2` object. Its type is `Date` (a `Scalar`). */ - date2?: DateObject2.date2$Expanded | $Select.SelectAlias.SelectAlias + date2?: DateObject2.date2$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1243,7 +2205,9 @@ export interface DateObject2 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateObject2$FragmentInline | DateObject2$FragmentInline[] + ___?: + | DateObject2$FragmentInline<$Scalars> + | DateObject2$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1255,19 +2219,32 @@ export interface DateObject2 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateObject2$FragmentInline extends DateObject2, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateObject2$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateObject2<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace DateObject2 { + export type date2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date2$SelectionSet<$Scalars> + + export interface date2$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date2` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date2$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type date2 = $Select.Indicator.NoArgsIndicator + export type date2$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date2$SelectionSet<$Scalars> + > } // @@ -1284,15 +2261,17 @@ export namespace DateObject2 { // ----------------------------------------| Entrypoint Interface | -export interface ErrorOne extends $Select.Bases.ObjectLike { +export interface ErrorOne<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `infoId` field on the `ErrorOne` object. Its type is `ID` (a `Scalar`). */ - infoId?: ErrorOne.infoId$Expanded | $Select.SelectAlias.SelectAlias + infoId?: ErrorOne.infoId$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `message` field on the `ErrorOne` object. Its type is `String` (a `Scalar`). */ - message?: ErrorOne.message$Expanded | $Select.SelectAlias.SelectAlias + message?: ErrorOne.message$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1302,7 +2281,9 @@ export interface ErrorOne extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ErrorOne$FragmentInline | ErrorOne$FragmentInline[] + ___?: + | ErrorOne$FragmentInline<$Scalars> + | ErrorOne$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1314,28 +2295,54 @@ export interface ErrorOne extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ErrorOne$FragmentInline extends ErrorOne, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ErrorOne$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ErrorOne<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ErrorOne { + export type infoId<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | infoId$SelectionSet<$Scalars> + + export interface infoId$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `infoId` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type infoId$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type infoId$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | infoId$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> - export type infoId = $Select.Indicator.NoArgsIndicator + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `message` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } // @@ -1352,15 +2359,17 @@ export namespace ErrorOne { // ----------------------------------------| Entrypoint Interface | -export interface ErrorTwo extends $Select.Bases.ObjectLike { +export interface ErrorTwo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `infoInt` field on the `ErrorTwo` object. Its type is `Int` (a `Scalar`). */ - infoInt?: ErrorTwo.infoInt$Expanded | $Select.SelectAlias.SelectAlias + infoInt?: ErrorTwo.infoInt$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `message` field on the `ErrorTwo` object. Its type is `String` (a `Scalar`). */ - message?: ErrorTwo.message$Expanded | $Select.SelectAlias.SelectAlias + message?: ErrorTwo.message$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1370,7 +2379,9 @@ export interface ErrorTwo extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ErrorTwo$FragmentInline | ErrorTwo$FragmentInline[] + ___?: + | ErrorTwo$FragmentInline<$Scalars> + | ErrorTwo$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1382,28 +2393,54 @@ export interface ErrorTwo extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ErrorTwo$FragmentInline extends ErrorTwo, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ErrorTwo$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ErrorTwo<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ErrorTwo { + export type infoInt<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | infoInt$SelectionSet<$Scalars> + + export interface infoInt$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `infoInt` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type infoInt$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type infoInt$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | infoInt$SelectionSet<$Scalars> + > - export type infoInt = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type message<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + + export interface message$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `message` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type message$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type message = $Select.Indicator.NoArgsIndicator + export type message$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | message$SelectionSet<$Scalars> + > } // @@ -1423,11 +2460,11 @@ export namespace ErrorTwo { /** * Object documentation. */ -export interface Foo extends $Select.Bases.ObjectLike { +export interface Foo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the `id` field on the `Foo` object. Its type is `ID` (a `Scalar`). */ - id?: Foo.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Foo.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1437,7 +2474,9 @@ export interface Foo extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Foo$FragmentInline | Foo$FragmentInline[] + ___?: + | Foo$FragmentInline<$Scalars> + | Foo$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1449,19 +2488,32 @@ export interface Foo extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Foo$FragmentInline extends Foo, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Foo$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Foo<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Foo { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1478,27 +2530,33 @@ export namespace Foo { // ----------------------------------------| Entrypoint Interface | -export interface Object1 extends $Select.Bases.ObjectLike { +export interface Object1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ + /** + * Select the `ABCEnum` field on the `Object1` object. Its type is Enum. + */ + ABCEnum?: Object1.ABCEnum$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `boolean` field on the `Object1` object. Its type is `Boolean` (a `Scalar`). */ - boolean?: Object1.$boolean$Expanded | $Select.SelectAlias.SelectAlias + boolean?: Object1.$boolean$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `float` field on the `Object1` object. Its type is `Float` (a `Scalar`). */ - float?: Object1.float$Expanded | $Select.SelectAlias.SelectAlias + float?: Object1.float$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Object1` object. Its type is `ID` (a `Scalar`). */ - id?: Object1.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Object1.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `int` field on the `Object1` object. Its type is `Int` (a `Scalar`). */ - int?: Object1.int$Expanded | $Select.SelectAlias.SelectAlias + int?: Object1.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `string` field on the `Object1` object. Its type is `String` (a `Scalar`). */ - string?: Object1.$string$Expanded | $Select.SelectAlias.SelectAlias + string?: Object1.$string$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1508,7 +2566,9 @@ export interface Object1 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object1$FragmentInline | Object1$FragmentInline[] + ___?: + | Object1$FragmentInline<$Scalars> + | Object1$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1520,55 +2580,142 @@ export interface Object1 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object1$FragmentInline extends Object1, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Object1$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Object1<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object1 { + export type ABCEnum<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | ABCEnum$SelectionSet<$Scalars> + + export interface ABCEnum$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `ABCEnum` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type ABCEnum$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | ABCEnum$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $boolean<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + + export interface $boolean$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `$boolean` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $boolean$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $boolean$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + > - export type $boolean = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type float<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | float$SelectionSet<$Scalars> + + export interface float$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `float` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type float$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type float$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | float$SelectionSet<$Scalars> + > - export type float = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > - export type id = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > - export type int = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type $string<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + + export interface $string$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `$string` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $string$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type $string = $Select.Indicator.NoArgsIndicator + export type $string$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $string$SelectionSet<$Scalars> + > } // @@ -1585,15 +2732,21 @@ export namespace Object1 { // ----------------------------------------| Entrypoint Interface | -export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { +export interface Object1ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `id` field on the `Object1ImplementingInterface` object. Its type is `ID` (a `Scalar`). */ - id?: Object1ImplementingInterface.id$Expanded | $Select.SelectAlias.SelectAlias + id?: + | Object1ImplementingInterface.id$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `int` field on the `Object1ImplementingInterface` object. Its type is `Int` (a `Scalar`). */ - int?: Object1ImplementingInterface.int$Expanded | $Select.SelectAlias.SelectAlias + int?: + | Object1ImplementingInterface.int$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1603,7 +2756,9 @@ export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object1ImplementingInterface$FragmentInline | Object1ImplementingInterface$FragmentInline[] + ___?: + | Object1ImplementingInterface$FragmentInline<$Scalars> + | Object1ImplementingInterface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1615,30 +2770,54 @@ export interface Object1ImplementingInterface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object1ImplementingInterface$FragmentInline - extends Object1ImplementingInterface, $Select.Directive.$Groups.InlineFragment.Fields -{} +export interface Object1ImplementingInterface$FragmentInline< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, +> extends Object1ImplementingInterface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object1ImplementingInterface { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -1655,17 +2834,21 @@ export namespace Object1ImplementingInterface { // ----------------------------------------| Entrypoint Interface | -export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { +export interface Object2ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `boolean` field on the `Object2ImplementingInterface` object. Its type is `Boolean` (a `Scalar`). */ boolean?: - | Object2ImplementingInterface.$boolean$Expanded - | $Select.SelectAlias.SelectAlias + | Object2ImplementingInterface.$boolean$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Object2ImplementingInterface` object. Its type is `ID` (a `Scalar`). */ - id?: Object2ImplementingInterface.id$Expanded | $Select.SelectAlias.SelectAlias + id?: + | Object2ImplementingInterface.id$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1675,7 +2858,9 @@ export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Object2ImplementingInterface$FragmentInline | Object2ImplementingInterface$FragmentInline[] + ___?: + | Object2ImplementingInterface$FragmentInline<$Scalars> + | Object2ImplementingInterface$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1687,30 +2872,54 @@ export interface Object2ImplementingInterface extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Object2ImplementingInterface$FragmentInline - extends Object2ImplementingInterface, $Select.Directive.$Groups.InlineFragment.Fields -{} +export interface Object2ImplementingInterface$FragmentInline< + $Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}, +> extends Object2ImplementingInterface<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Object2ImplementingInterface { + export type $boolean<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + + export interface $boolean$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `$boolean` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $boolean$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $boolean$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $boolean$SelectionSet<$Scalars> + > - export type $boolean = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1727,15 +2936,17 @@ export namespace Object2ImplementingInterface { // ----------------------------------------| Entrypoint Interface | -export interface ObjectNested extends $Select.Bases.ObjectLike { +export interface ObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `id` field on the `ObjectNested` object. Its type is `ID` (a `Scalar`). */ - id?: ObjectNested.id$Expanded | $Select.SelectAlias.SelectAlias + id?: ObjectNested.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `object` field on the `ObjectNested` object. Its type is Object. */ - object?: ObjectNested.$object$Expanded | $Select.SelectAlias.SelectAlias + object?: ObjectNested.$object$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1745,7 +2956,9 @@ export interface ObjectNested extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ObjectNested$FragmentInline | ObjectNested$FragmentInline[] + ___?: + | ObjectNested$FragmentInline<$Scalars> + | ObjectNested$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1757,22 +2970,51 @@ export interface ObjectNested extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ObjectNested$FragmentInline extends ObjectNested, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ObjectNested$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ObjectNested<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ObjectNested { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type $object<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $object$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface $object$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Object1<$Scalars> + {} - export interface $object extends _RefDefs._Object1 {} - export type $object$Expanded = $object + // --- expanded --- + + /** + * This is the "expanded" version of the `$object` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type $object$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + $object$SelectionSet<$Scalars> + > } // @@ -1789,11 +3031,15 @@ export namespace ObjectNested { // ----------------------------------------| Entrypoint Interface | -export interface ObjectUnion extends $Select.Bases.ObjectLike { +export interface ObjectUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `fooBarUnion` field on the `ObjectUnion` object. Its type is Union. */ - fooBarUnion?: ObjectUnion.fooBarUnion$Expanded | $Select.SelectAlias.SelectAlias + fooBarUnion?: + | ObjectUnion.fooBarUnion$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1803,7 +3049,9 @@ export interface ObjectUnion extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: ObjectUnion$FragmentInline | ObjectUnion$FragmentInline[] + ___?: + | ObjectUnion$FragmentInline<$Scalars> + | ObjectUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1815,13 +3063,31 @@ export interface ObjectUnion extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface ObjectUnion$FragmentInline extends ObjectUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface ObjectUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends ObjectUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace ObjectUnion { - export interface fooBarUnion extends _RefDefs._FooBarUnion {} - export type fooBarUnion$Expanded = fooBarUnion + export type fooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = fooBarUnion$SelectionSet< + $Scalars + > + + export interface fooBarUnion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$FooBarUnion<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `fooBarUnion` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type fooBarUnion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + fooBarUnion$SelectionSet<$Scalars> + > } // @@ -1838,11 +3104,13 @@ export namespace ObjectUnion { // ----------------------------------------| Entrypoint Interface | -export interface lowerCaseObject extends $Select.Bases.ObjectLike { +export interface lowerCaseObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `id` field on the `lowerCaseObject` object. Its type is `ID` (a `Scalar`). */ - id?: lowerCaseObject.id$Expanded | $Select.SelectAlias.SelectAlias + id?: lowerCaseObject.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1852,7 +3120,9 @@ export interface lowerCaseObject extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseObject$FragmentInline | lowerCaseObject$FragmentInline[] + ___?: + | lowerCaseObject$FragmentInline<$Scalars> + | lowerCaseObject$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1864,21 +3134,32 @@ export interface lowerCaseObject extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseObject$FragmentInline - extends lowerCaseObject, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseObject$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseObject<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace lowerCaseObject { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type id = $Select.Indicator.NoArgsIndicator + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > } // @@ -1895,11 +3176,13 @@ export namespace lowerCaseObject { // ----------------------------------------| Entrypoint Interface | -export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { +export interface lowerCaseObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `int` field on the `lowerCaseObject2` object. Its type is `Int` (a `Scalar`). */ - int?: lowerCaseObject2.int$Expanded | $Select.SelectAlias.SelectAlias + int?: lowerCaseObject2.int$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1909,7 +3192,9 @@ export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseObject2$FragmentInline | lowerCaseObject2$FragmentInline[] + ___?: + | lowerCaseObject2$FragmentInline<$Scalars> + | lowerCaseObject2$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1921,21 +3206,32 @@ export interface lowerCaseObject2 extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseObject2$FragmentInline - extends lowerCaseObject2, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseObject2$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseObject2<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace lowerCaseObject2 { + export type int<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + + export interface int$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `int` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type int$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type int = $Select.Indicator.NoArgsIndicator + export type int$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | int$SelectionSet<$Scalars> + > } // @@ -1954,9 +3250,9 @@ export namespace lowerCaseObject2 { // // -export interface DateUnion { - ___on_DateObject1?: DateObject1 - ___on_DateObject2?: DateObject2 +export interface DateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_DateObject1?: DateObject1<$Scalars> + ___on_DateObject2?: DateObject2<$Scalars> /** * Inline fragments for field groups. @@ -1966,7 +3262,9 @@ export interface DateUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: DateUnion$FragmentInline | DateUnion$FragmentInline[] + ___?: + | DateUnion$FragmentInline<$Scalars> + | DateUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -1978,14 +3276,16 @@ export interface DateUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface DateUnion$FragmentInline extends DateUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface DateUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends DateUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} /** * Union documentation. */ -export interface FooBarUnion { - ___on_Bar?: Bar - ___on_Foo?: Foo +export interface FooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_Bar?: Bar<$Scalars> + ___on_Foo?: Foo<$Scalars> /** * Inline fragments for field groups. @@ -1995,7 +3295,9 @@ export interface FooBarUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: FooBarUnion$FragmentInline | FooBarUnion$FragmentInline[] + ___?: + | FooBarUnion$FragmentInline<$Scalars> + | FooBarUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -2007,12 +3309,14 @@ export interface FooBarUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface FooBarUnion$FragmentInline extends FooBarUnion, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface FooBarUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends FooBarUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -export interface Result { - ___on_ErrorOne?: ErrorOne - ___on_ErrorTwo?: ErrorTwo - ___on_Object1?: Object1 +export interface Result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_ErrorOne?: ErrorOne<$Scalars> + ___on_ErrorTwo?: ErrorTwo<$Scalars> + ___on_Object1?: Object1<$Scalars> /** * Inline fragments for field groups. @@ -2022,7 +3326,9 @@ export interface Result { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Result$FragmentInline | Result$FragmentInline[] + ___?: + | Result$FragmentInline<$Scalars> + | Result$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -2034,11 +3340,13 @@ export interface Result { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Result$FragmentInline extends Result, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Result$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Result<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -export interface lowerCaseUnion { - ___on_lowerCaseObject?: lowerCaseObject - ___on_lowerCaseObject2?: lowerCaseObject2 +export interface lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_lowerCaseObject?: lowerCaseObject<$Scalars> + ___on_lowerCaseObject2?: lowerCaseObject2<$Scalars> /** * Inline fragments for field groups. @@ -2048,7 +3356,9 @@ export interface lowerCaseUnion { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: lowerCaseUnion$FragmentInline | lowerCaseUnion$FragmentInline[] + ___?: + | lowerCaseUnion$FragmentInline<$Scalars> + | lowerCaseUnion$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -2060,8 +3370,8 @@ export interface lowerCaseUnion { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface lowerCaseUnion$FragmentInline - extends lowerCaseUnion, $Select.Directive.$Groups.InlineFragment.Fields +export interface lowerCaseUnion$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends lowerCaseUnion<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} /** @@ -2071,33 +3381,42 @@ export interface lowerCaseUnion$FragmentInline * For example imagine `Query.Foo` field with type also called `Foo`. Our generated interfaces for each field * would end up with an error of `export interface Foo extends Foo ...` */ -export namespace _RefDefs { - export type _Mutation = Mutation - export type _Query = Query - export type _ABCEnum = ABCEnum - export type _Case = Case - export type _InputObject = InputObject - export type _InputObjectCircular = InputObjectCircular - export type _InputObjectNested = InputObjectNested - export type _InputObjectNestedNonNull = InputObjectNestedNonNull - export type _DateInterface1 = DateInterface1 - export type _Error = Error - export type _Interface = Interface - export type _Bar = Bar - export type _DateObject1 = DateObject1 - export type _DateObject2 = DateObject2 - export type _ErrorOne = ErrorOne - export type _ErrorTwo = ErrorTwo - export type _Foo = Foo - export type _Object1 = Object1 - export type _Object1ImplementingInterface = Object1ImplementingInterface - export type _Object2ImplementingInterface = Object2ImplementingInterface - export type _ObjectNested = ObjectNested - export type _ObjectUnion = ObjectUnion - export type _lowerCaseObject = lowerCaseObject - export type _lowerCaseObject2 = lowerCaseObject2 - export type _DateUnion = DateUnion - export type _FooBarUnion = FooBarUnion - export type _Result = Result - export type _lowerCaseUnion = lowerCaseUnion +export namespace $NamedTypes { + export type $Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Mutation<$Scalars> + export type $Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Query<$Scalars> + export type $ABCEnum = ABCEnum + export type $Case = Case + export type $InputObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObject<$Scalars> + export type $InputObjectCircular<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObjectCircular< + $Scalars + > + export type $InputObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = InputObjectNested< + $Scalars + > + export type $InputObjectNestedNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + InputObjectNestedNonNull<$Scalars> + export type $DateInterface1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateInterface1<$Scalars> + export type $Error<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Error<$Scalars> + export type $Interface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Interface<$Scalars> + export type $Bar<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Bar<$Scalars> + export type $DateObject1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateObject1<$Scalars> + export type $DateObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateObject2<$Scalars> + export type $ErrorOne<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ErrorOne<$Scalars> + export type $ErrorTwo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ErrorTwo<$Scalars> + export type $Foo<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Foo<$Scalars> + export type $Object1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Object1<$Scalars> + export type $Object1ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + Object1ImplementingInterface<$Scalars> + export type $Object2ImplementingInterface<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + Object2ImplementingInterface<$Scalars> + export type $ObjectNested<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ObjectNested<$Scalars> + export type $ObjectUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = ObjectUnion<$Scalars> + export type $lowerCaseObject<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseObject<$Scalars> + export type $lowerCaseObject2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseObject2< + $Scalars + > + export type $DateUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateUnion<$Scalars> + export type $FooBarUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = FooBarUnion<$Scalars> + export type $Result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Result<$Scalars> + export type $lowerCaseUnion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = lowerCaseUnion<$Scalars> } diff --git a/tests/_/schemas/kitchen-sink/graffle/schema.graphql b/tests/_/schemas/kitchen-sink/graffle/schema.graphql index 9bfc1c357..f0d473e66 100644 --- a/tests/_/schemas/kitchen-sink/graffle/schema.graphql +++ b/tests/_/schemas/kitchen-sink/graffle/schema.graphql @@ -89,6 +89,7 @@ type Mutation { } type Object1 { + ABCEnum: ABCEnum boolean: Boolean float: Float id: ID diff --git a/tests/_/schemas/kitchen-sink/schema.ts b/tests/_/schemas/kitchen-sink/schema.ts index eeb573486..7ec9acfab 100644 --- a/tests/_/schemas/kitchen-sink/schema.ts +++ b/tests/_/schemas/kitchen-sink/schema.ts @@ -47,6 +47,7 @@ const Object1 = builder.simpleObject(`Object1`, { float: t.float(), boolean: t.boolean(), id: t.id(), + ABCEnum: t.field({ type: ABCEnum }), }), }) diff --git a/tests/_/schemas/mutation-only/graffle/modules/Global.ts b/tests/_/schemas/mutation-only/graffle/modules/Global.ts index a640cd1d9..bc46bba37 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/Global.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/Global.ts @@ -15,7 +15,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: {} defaultSchemaUrl: null } } diff --git a/tests/_/schemas/mutation-only/graffle/modules/MethodsDocument.ts b/tests/_/schemas/mutation-only/graffle/modules/MethodsDocument.ts index 459d5b141..ac1681bcf 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/MethodsDocument.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/MethodsDocument.ts @@ -2,9 +2,11 @@ import type * as Utilities from '../../../../../../src/entrypoints/utilities-for import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -14,5 +16,5 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } diff --git a/tests/_/schemas/mutation-only/graffle/modules/MethodsRoot.ts b/tests/_/schemas/mutation-only/graffle/modules/MethodsRoot.ts index 431020f45..93b9cef0a 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/MethodsRoot.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/MethodsRoot.ts @@ -1,54 +1,58 @@ import { type Simplify } from 'type-fest' import type { InferResult } from '../../../../../../src/entrypoints/schema.js' -import type * as Utils from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface MutationMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation>) => Promise< +export interface MutationMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Mutation<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Mutation<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Mutation' }, '__typename' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - mutation: MutationMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + mutation: MutationMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } diff --git a/tests/_/schemas/mutation-only/graffle/modules/Scalar.ts b/tests/_/schemas/mutation-only/graffle/modules/Scalar.ts index 026aa6405..249af6965 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/Scalar.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/Scalar.ts @@ -1,3 +1,3 @@ -import type { SchemaKit } from '../../../../../../src/entrypoints/schema.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' export * from '../../../../../../src/layers/1_Schema/Hybrid/types/Scalar/Scalar.js' diff --git a/tests/_/schemas/mutation-only/graffle/modules/Schema.ts b/tests/_/schemas/mutation-only/graffle/modules/Schema.ts index 920baef2e..08c2fe897 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/Schema.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/Schema.ts @@ -129,11 +129,13 @@ export namespace Schema { // // -import type * as Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Mutation'] RootUnion: Schema.Mutation @@ -148,6 +150,6 @@ export interface Schema extends Utilities.SchemaIndexBase { objects: {} unions: {} interfaces: {} - customScalars: Utilities.SchemaIndexBase['customScalars'] - extensions: Utilities.GlobalRegistry.TypeExtensions + scalars: $Scalars + extensions: $$Utilities.GlobalRegistry.TypeExtensions } diff --git a/tests/_/schemas/mutation-only/graffle/modules/SelectionSets.ts b/tests/_/schemas/mutation-only/graffle/modules/SelectionSets.ts index 295fe990b..e9ce611d2 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/SelectionSets.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/SelectionSets.ts @@ -1,5 +1,5 @@ import type { Select as $Select } from '../../../../../../src/entrypoints/schema.js' -import type * as $Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' // // @@ -18,8 +18,8 @@ import type * as $Utilities from '../../../../../../src/entrypoints/utilities-fo // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - mutation?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + mutation?: Record> } // @@ -52,15 +52,15 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Mutation { +export interface Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `id` field on the `Mutation` object. Its type is `ID` (a `Scalar`). */ - id?: Mutation.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Mutation.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `idNonNull` field on the `Mutation` object. Its type is `ID` (a `Scalar`). */ - idNonNull?: Mutation.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Mutation.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -70,7 +70,9 @@ export interface Mutation { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Mutation$FragmentInline | Mutation$FragmentInline[] + ___?: + | Mutation$FragmentInline<$Scalars> + | Mutation$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -82,28 +84,54 @@ export interface Mutation { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Mutation$FragmentInline extends Mutation, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Mutation$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Mutation<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Mutation { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type idNonNull = $Select.Indicator.NoArgsIndicator + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + > } /** @@ -113,6 +141,6 @@ export namespace Mutation { * For example imagine `Query.Foo` field with type also called `Foo`. Our generated interfaces for each field * would end up with an error of `export interface Foo extends Foo ...` */ -export namespace _RefDefs { - export type _Mutation = Mutation +export namespace $NamedTypes { + export type $Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Mutation<$Scalars> } diff --git a/tests/_/schemas/pokemon/graffle/modules/Global.ts b/tests/_/schemas/pokemon/graffle/modules/Global.ts index 14e54e99b..d6045172e 100644 --- a/tests/_/schemas/pokemon/graffle/modules/Global.ts +++ b/tests/_/schemas/pokemon/graffle/modules/Global.ts @@ -15,7 +15,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: {} /** * http://localhost:3000/graphql diff --git a/tests/_/schemas/pokemon/graffle/modules/MethodsDocument.ts b/tests/_/schemas/pokemon/graffle/modules/MethodsDocument.ts index 459d5b141..ac1681bcf 100644 --- a/tests/_/schemas/pokemon/graffle/modules/MethodsDocument.ts +++ b/tests/_/schemas/pokemon/graffle/modules/MethodsDocument.ts @@ -2,9 +2,11 @@ import type * as Utilities from '../../../../../../src/entrypoints/utilities-for import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -14,5 +16,5 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } diff --git a/tests/_/schemas/pokemon/graffle/modules/MethodsRoot.ts b/tests/_/schemas/pokemon/graffle/modules/MethodsRoot.ts index e247c34b7..23f429613 100644 --- a/tests/_/schemas/pokemon/graffle/modules/MethodsRoot.ts +++ b/tests/_/schemas/pokemon/graffle/modules/MethodsRoot.ts @@ -1,131 +1,147 @@ import { type Simplify } from 'type-fest' import type { InferResult } from '../../../../../../src/entrypoints/schema.js' -import type * as Utils from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface MutationMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation>) => Promise< +export interface MutationMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Mutation<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Mutation<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Mutation' }, '__typename' > > > - addPokemon: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation.addPokemon>) => Promise< + addPokemon: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.addPokemon<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ addPokemon: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ addPokemon: $SelectionSet }, Schema<$Context['scalars']>>, 'addPokemon' > > > } -export interface QueryMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query>) => Promise< +export interface QueryMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Query<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Query<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Query' }, '__typename' > > > - battles: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.battles>) => Promise< + battles: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.battles<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ battles: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ battles: $SelectionSet }, Schema<$Context['scalars']>>, 'battles' > > > - beings: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.beings>) => Promise< + beings: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.beings<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ beings: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ beings: $SelectionSet }, Schema<$Context['scalars']>>, 'beings' > > > - pokemon: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.pokemon>) => Promise< + pokemon: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.pokemon<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ pokemon: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ pokemon: $SelectionSet }, Schema<$Context['scalars']>>, 'pokemon' > > > - pokemonByName: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.pokemonByName>) => Promise< + pokemonByName: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.pokemonByName<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ pokemonByName: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ pokemonByName: $SelectionSet }, Schema<$Context['scalars']>>, 'pokemonByName' > > > - pokemons: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.pokemons>) => Promise< + pokemons: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.pokemons<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ pokemons: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ pokemons: $SelectionSet }, Schema<$Context['scalars']>>, 'pokemons' > > > - trainerByName: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.trainerByName>) => Promise< + trainerByName: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.trainerByName<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ trainerByName: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ trainerByName: $SelectionSet }, Schema<$Context['scalars']>>, 'trainerByName' > > > - trainers: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.trainers>) => Promise< + trainers: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.trainers<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ trainers: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ trainers: $SelectionSet }, Schema<$Context['scalars']>>, 'trainers' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - mutation: MutationMethods<$Config> - query: QueryMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + mutation: MutationMethods<$Context> + query: QueryMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } diff --git a/tests/_/schemas/pokemon/graffle/modules/Scalar.ts b/tests/_/schemas/pokemon/graffle/modules/Scalar.ts index 026aa6405..249af6965 100644 --- a/tests/_/schemas/pokemon/graffle/modules/Scalar.ts +++ b/tests/_/schemas/pokemon/graffle/modules/Scalar.ts @@ -1,3 +1,3 @@ -import type { SchemaKit } from '../../../../../../src/entrypoints/schema.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' export * from '../../../../../../src/layers/1_Schema/Hybrid/types/Scalar/Scalar.js' diff --git a/tests/_/schemas/pokemon/graffle/modules/Schema.ts b/tests/_/schemas/pokemon/graffle/modules/Schema.ts index 5d5b0d397..82b8a9c07 100644 --- a/tests/_/schemas/pokemon/graffle/modules/Schema.ts +++ b/tests/_/schemas/pokemon/graffle/modules/Schema.ts @@ -260,11 +260,13 @@ export namespace Schema { // // -import type * as Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Mutation', 'Query'] RootUnion: Schema.Mutation | Schema.Query @@ -306,6 +308,6 @@ export interface Schema extends Utilities.SchemaIndexBase { interfaces: { Being: Schema.Being } - customScalars: Utilities.SchemaIndexBase['customScalars'] - extensions: Utilities.GlobalRegistry.TypeExtensions + scalars: $Scalars + extensions: $$Utilities.GlobalRegistry.TypeExtensions } diff --git a/tests/_/schemas/pokemon/graffle/modules/SelectionSets.ts b/tests/_/schemas/pokemon/graffle/modules/SelectionSets.ts index bb5b15f1e..b0a47d03f 100644 --- a/tests/_/schemas/pokemon/graffle/modules/SelectionSets.ts +++ b/tests/_/schemas/pokemon/graffle/modules/SelectionSets.ts @@ -1,5 +1,5 @@ import type { Select as $Select } from '../../../../../../src/entrypoints/schema.js' -import type * as $Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' // // @@ -18,9 +18,9 @@ import type * as $Utilities from '../../../../../../src/entrypoints/utilities-fo // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - query?: Record - mutation?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + query?: Record> + mutation?: Record> } // @@ -53,11 +53,11 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Mutation { +export interface Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `addPokemon` field on the `Mutation` object. Its type is Object. */ - addPokemon?: Mutation.addPokemon | $Select.SelectAlias.SelectAlias + addPokemon?: Mutation.addPokemon<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -67,7 +67,9 @@ export interface Mutation { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Mutation$FragmentInline | Mutation$FragmentInline[] + ___?: + | Mutation$FragmentInline<$Scalars> + | Mutation$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -79,25 +81,44 @@ export interface Mutation { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Mutation$FragmentInline extends Mutation, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Mutation$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Mutation<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Mutation { - export interface addPokemon extends _RefDefs._Pokemon { + export type addPokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = addPokemon$SelectionSet< + $Scalars + > + + export interface addPokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + { /** - * Arguments for `addPokemon` field. - * Some (2/5) arguments are required so you must include this. + * Arguments for `addPokemon` field. Some (2/5) arguments are required so you must include this. */ - $: { - attack?: number | undefined | null - defense?: number | undefined | null - hp?: number | undefined | null - name: string - $type: _RefDefs._PokemonType - } + $: addPokemon$Arguments<$Scalars> } - export type addPokemon$Expanded = addPokemon + + export interface addPokemon$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + attack?: number | undefined | null + defense?: number | undefined | null + hp?: number | undefined | null + name: string + $type: $NamedTypes.$PokemonType + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `addPokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type addPokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + addPokemon$SelectionSet<$Scalars> + > } // @@ -114,35 +135,35 @@ export namespace Mutation { // ----------------------------------------| Entrypoint Interface | -export interface Query { +export interface Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `battles` field on the `Query` object. Its type is Union. */ - battles?: Query.battles$Expanded | $Select.SelectAlias.SelectAlias + battles?: Query.battles$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `beings` field on the `Query` object. Its type is Interface. */ - beings?: Query.beings$Expanded | $Select.SelectAlias.SelectAlias + beings?: Query.beings$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemon` field on the `Query` object. Its type is Object. */ - pokemon?: Query.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: Query.pokemon$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemonByName` field on the `Query` object. Its type is Object. */ - pokemonByName?: Query.pokemonByName | $Select.SelectAlias.SelectAlias + pokemonByName?: Query.pokemonByName<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemons` field on the `Query` object. Its type is Object. */ - pokemons?: Query.pokemons$Expanded | $Select.SelectAlias.SelectAlias + pokemons?: Query.pokemons$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainerByName` field on the `Query` object. Its type is Object. */ - trainerByName?: Query.trainerByName | $Select.SelectAlias.SelectAlias + trainerByName?: Query.trainerByName<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainers` field on the `Query` object. Its type is Object. */ - trainers?: Query.trainers$Expanded | $Select.SelectAlias.SelectAlias + trainers?: Query.trainers$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -152,7 +173,9 @@ export interface Query { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Query$FragmentInline | Query$FragmentInline[] + ___?: + | Query$FragmentInline<$Scalars> + | Query$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -164,49 +187,176 @@ export interface Query { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Query$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Query<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Query { - export interface battles extends _RefDefs._Battle {} - export type battles$Expanded = battles - export interface beings extends _RefDefs._Being {} - export type beings$Expanded = beings - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon - export interface pokemonByName extends _RefDefs._Pokemon { + export type battles<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = battles$SelectionSet<$Scalars> + + export interface battles$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Battle<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `battles` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type battles$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + battles$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type beings<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = beings$SelectionSet<$Scalars> + + export interface beings$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Being<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `beings` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type beings$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + beings$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type pokemonByName<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemonByName$SelectionSet< + $Scalars + > + + export interface pokemonByName$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + { /** - * Arguments for `pokemonByName` field. - * All arguments are required so you must include this. + * Arguments for `pokemonByName` field. All arguments are required so you must include this. */ - $: { - name: string - } + $: pokemonByName$Arguments<$Scalars> } - export type pokemonByName$Expanded = pokemonByName - export interface pokemons extends _RefDefs._Pokemon { + + export interface pokemonByName$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + name: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemonByName` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemonByName$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + pokemonByName$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type pokemons<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemons$SelectionSet<$Scalars> + + export interface pokemons$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + { /** - * Arguments for `pokemons` field. - * No arguments are required so you may omit this. + * Arguments for `pokemons` field. No arguments are required so you may omit this. */ - $?: { - filter?: _RefDefs._PokemonFilter | undefined | null - } + $?: pokemons$Arguments<$Scalars> + } + + export interface pokemons$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + filter?: $NamedTypes.$PokemonFilter<$Scalars> | undefined | null } - export type pokemons$Expanded = pokemons - export interface trainerByName extends _RefDefs._Trainer { + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemons` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemons$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemons$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainerByName<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainerByName$SelectionSet< + $Scalars + > + + export interface trainerByName$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + { /** - * Arguments for `trainerByName` field. - * All arguments are required so you must include this. + * Arguments for `trainerByName` field. All arguments are required so you must include this. */ - $: { - name: string - } + $: trainerByName$Arguments<$Scalars> } - export type trainerByName$Expanded = trainerByName - export interface trainers extends _RefDefs._Trainer {} - export type trainers$Expanded = trainers + + export interface trainerByName$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + name: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainerByName` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainerByName$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + trainerByName$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainers<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainers$SelectionSet<$Scalars> + + export interface trainers$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainers` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainers$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainers$SelectionSet<$Scalars> + > } // @@ -260,17 +410,17 @@ export type TrainerClass = // // -export interface DateFilter { +export interface DateFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { gte?: number | undefined | null lte?: number | undefined | null } -export interface PokemonFilter { - birthday?: _RefDefs._DateFilter | undefined | null - name?: _RefDefs._StringFilter | undefined | null +export interface PokemonFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + birthday?: $NamedTypes.$DateFilter<$Scalars> | undefined | null + name?: $NamedTypes.$StringFilter<$Scalars> | undefined | null } -export interface StringFilter { +export interface StringFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { contains?: string | undefined | null in?: Array | undefined | null } @@ -291,16 +441,15 @@ export interface StringFilter { // // -// -------------- -// Interface Type Being -// -------------- +// Interface Type: Being +// -------------------------------------------------------------------------------------------------- -export interface Being extends $Select.Bases.ObjectLike { - id?: Being.id - name?: Being.name - ___on_Patron?: Patron - ___on_Pokemon?: Pokemon - ___on_Trainer?: Trainer +export interface Being<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { + id?: Being.id<$Scalars> + name?: Being.name<$Scalars> + ___on_Patron?: Patron<$Scalars> + ___on_Pokemon?: Pokemon<$Scalars> + ___on_Trainer?: Trainer<$Scalars> /** * Inline fragments for field groups. @@ -310,7 +459,9 @@ export interface Being extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Being$FragmentInline | Being$FragmentInline[] + ___?: + | Being$FragmentInline<$Scalars> + | Being$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -323,26 +474,50 @@ export interface Being extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Being$FragmentInline extends Being, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Being$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Being<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Being { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type name = $Select.Indicator.NoArgsIndicator + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > } // @@ -375,23 +550,27 @@ export namespace Being { // ----------------------------------------| Entrypoint Interface | -export interface BattleRoyale extends $Select.Bases.ObjectLike { +export interface BattleRoyale<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `combatants` field on the `BattleRoyale` object. Its type is Object. */ - combatants?: BattleRoyale.combatants$Expanded | $Select.SelectAlias.SelectAlias + combatants?: + | BattleRoyale.combatants$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `date` field on the `BattleRoyale` object. Its type is `Float` (a `Scalar`). */ - date?: BattleRoyale.date$Expanded | $Select.SelectAlias.SelectAlias + date?: BattleRoyale.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `BattleRoyale` object. Its type is `ID` (a `Scalar`). */ - id?: BattleRoyale.id$Expanded | $Select.SelectAlias.SelectAlias + id?: BattleRoyale.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `winner` field on the `BattleRoyale` object. Its type is Object. */ - winner?: BattleRoyale.winner$Expanded | $Select.SelectAlias.SelectAlias + winner?: BattleRoyale.winner$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -401,7 +580,9 @@ export interface BattleRoyale extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: BattleRoyale$FragmentInline | BattleRoyale$FragmentInline[] + ___?: + | BattleRoyale$FragmentInline<$Scalars> + | BattleRoyale$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -413,33 +594,94 @@ export interface BattleRoyale extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface BattleRoyale$FragmentInline extends BattleRoyale, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface BattleRoyale$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends BattleRoyale<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace BattleRoyale { - export interface combatants extends _RefDefs._CombatantMultiPokemon {} - export type combatants$Expanded = combatants + export type combatants<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = combatants$SelectionSet< + $Scalars + > + + export interface combatants$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$CombatantMultiPokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `combatants` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type combatants$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + combatants$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> - export type date = $Select.Indicator.NoArgsIndicator + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type winner<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = winner$SelectionSet<$Scalars> + + export interface winner$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} - export type id = $Select.Indicator.NoArgsIndicator + // --- expanded --- - export interface winner extends _RefDefs._Trainer {} - export type winner$Expanded = winner + /** + * This is the "expanded" version of the `winner` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type winner$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + winner$SelectionSet<$Scalars> + > } // @@ -456,27 +698,33 @@ export namespace BattleRoyale { // ----------------------------------------| Entrypoint Interface | -export interface BattleTrainer extends $Select.Bases.ObjectLike { +export interface BattleTrainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `combatant1` field on the `BattleTrainer` object. Its type is Object. */ - combatant1?: BattleTrainer.combatant1$Expanded | $Select.SelectAlias.SelectAlias + combatant1?: + | BattleTrainer.combatant1$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `combatant2` field on the `BattleTrainer` object. Its type is Object. */ - combatant2?: BattleTrainer.combatant2$Expanded | $Select.SelectAlias.SelectAlias + combatant2?: + | BattleTrainer.combatant2$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `date` field on the `BattleTrainer` object. Its type is `Float` (a `Scalar`). */ - date?: BattleTrainer.date$Expanded | $Select.SelectAlias.SelectAlias + date?: BattleTrainer.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `BattleTrainer` object. Its type is `ID` (a `Scalar`). */ - id?: BattleTrainer.id$Expanded | $Select.SelectAlias.SelectAlias + id?: BattleTrainer.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `winner` field on the `BattleTrainer` object. Its type is Object. */ - winner?: BattleTrainer.winner$Expanded | $Select.SelectAlias.SelectAlias + winner?: BattleTrainer.winner$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -486,7 +734,9 @@ export interface BattleTrainer extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: BattleTrainer$FragmentInline | BattleTrainer$FragmentInline[] + ___?: + | BattleTrainer$FragmentInline<$Scalars> + | BattleTrainer$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -498,35 +748,115 @@ export interface BattleTrainer extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface BattleTrainer$FragmentInline extends BattleTrainer, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface BattleTrainer$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends BattleTrainer<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace BattleTrainer { - export interface combatant1 extends _RefDefs._CombatantSinglePokemon {} - export type combatant1$Expanded = combatant1 - export interface combatant2 extends _RefDefs._CombatantSinglePokemon {} - export type combatant2$Expanded = combatant2 + export type combatant1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = combatant1$SelectionSet< + $Scalars + > + + export interface combatant1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$CombatantSinglePokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `combatant1` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type combatant1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + combatant1$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type combatant2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = combatant2$SelectionSet< + $Scalars + > + + export interface combatant2$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$CombatantSinglePokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `combatant2` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type combatant2$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + combatant2$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > - export type date = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type winner<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = winner$SelectionSet<$Scalars> - export interface winner extends _RefDefs._Trainer {} - export type winner$Expanded = winner + export interface winner$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `winner` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type winner$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + winner$SelectionSet<$Scalars> + > } // @@ -543,31 +873,35 @@ export namespace BattleTrainer { // ----------------------------------------| Entrypoint Interface | -export interface BattleWild extends $Select.Bases.ObjectLike { +export interface BattleWild<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `date` field on the `BattleWild` object. Its type is `Float` (a `Scalar`). */ - date?: BattleWild.date$Expanded | $Select.SelectAlias.SelectAlias + date?: BattleWild.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `BattleWild` object. Its type is `ID` (a `Scalar`). */ - id?: BattleWild.id$Expanded | $Select.SelectAlias.SelectAlias + id?: BattleWild.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemon` field on the `BattleWild` object. Its type is Object. */ - pokemon?: BattleWild.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: BattleWild.pokemon$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `result` field on the `BattleWild` object. Its type is Enum. */ - result?: BattleWild.result$Expanded | $Select.SelectAlias.SelectAlias + result?: BattleWild.result$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `BattleWild` object. Its type is Object. */ - trainer?: BattleWild.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: BattleWild.trainer$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `wildPokemons` field on the `BattleWild` object. Its type is Object. */ - wildPokemons?: BattleWild.wildPokemons$Expanded | $Select.SelectAlias.SelectAlias + wildPokemons?: + | BattleWild.wildPokemons$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -577,7 +911,9 @@ export interface BattleWild extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: BattleWild$FragmentInline | BattleWild$FragmentInline[] + ___?: + | BattleWild$FragmentInline<$Scalars> + | BattleWild$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -589,44 +925,136 @@ export interface BattleWild extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface BattleWild$FragmentInline extends BattleWild, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface BattleWild$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends BattleWild<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace BattleWild { + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type date = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > - export type id = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | result$SelectionSet<$Scalars> + + export interface result$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon /** * This is the "expanded" version of the `result` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type result$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type result$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | result$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> - export type result = $Select.Indicator.NoArgsIndicator + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer - export interface wildPokemons extends _RefDefs._Pokemon {} - export type wildPokemons$Expanded = wildPokemons + // --- expanded --- + + /** + * This is the "expanded" version of the `trainer` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type wildPokemons<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = wildPokemons$SelectionSet< + $Scalars + > + + export interface wildPokemons$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `wildPokemons` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type wildPokemons$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + wildPokemons$SelectionSet<$Scalars> + > } // @@ -643,15 +1071,21 @@ export namespace BattleWild { // ----------------------------------------| Entrypoint Interface | -export interface CombatantMultiPokemon extends $Select.Bases.ObjectLike { +export interface CombatantMultiPokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `pokemons` field on the `CombatantMultiPokemon` object. Its type is Object. */ - pokemons?: CombatantMultiPokemon.pokemons$Expanded | $Select.SelectAlias.SelectAlias + pokemons?: + | CombatantMultiPokemon.pokemons$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `CombatantMultiPokemon` object. Its type is Object. */ - trainer?: CombatantMultiPokemon.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: + | CombatantMultiPokemon.trainer$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -661,7 +1095,9 @@ export interface CombatantMultiPokemon extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: CombatantMultiPokemon$FragmentInline | CombatantMultiPokemon$FragmentInline[] + ___?: + | CombatantMultiPokemon$FragmentInline<$Scalars> + | CombatantMultiPokemon$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -673,17 +1109,48 @@ export interface CombatantMultiPokemon extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface CombatantMultiPokemon$FragmentInline - extends CombatantMultiPokemon, $Select.Directive.$Groups.InlineFragment.Fields +export interface CombatantMultiPokemon$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends CombatantMultiPokemon<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace CombatantMultiPokemon { - export interface pokemons extends _RefDefs._Pokemon {} - export type pokemons$Expanded = pokemons - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer + export type pokemons<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemons$SelectionSet<$Scalars> + + export interface pokemons$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemons` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemons$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemons$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> + + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainer` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > } // @@ -700,15 +1167,21 @@ export namespace CombatantMultiPokemon { // ----------------------------------------| Entrypoint Interface | -export interface CombatantSinglePokemon extends $Select.Bases.ObjectLike { +export interface CombatantSinglePokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `pokemon` field on the `CombatantSinglePokemon` object. Its type is Object. */ - pokemon?: CombatantSinglePokemon.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: + | CombatantSinglePokemon.pokemon$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `CombatantSinglePokemon` object. Its type is Object. */ - trainer?: CombatantSinglePokemon.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: + | CombatantSinglePokemon.trainer$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -718,7 +1191,9 @@ export interface CombatantSinglePokemon extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: CombatantSinglePokemon$FragmentInline | CombatantSinglePokemon$FragmentInline[] + ___?: + | CombatantSinglePokemon$FragmentInline<$Scalars> + | CombatantSinglePokemon$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -730,17 +1205,48 @@ export interface CombatantSinglePokemon extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface CombatantSinglePokemon$FragmentInline - extends CombatantSinglePokemon, $Select.Directive.$Groups.InlineFragment.Fields +export interface CombatantSinglePokemon$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends CombatantSinglePokemon<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace CombatantSinglePokemon { - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> + + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainer` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > } // @@ -757,19 +1263,19 @@ export namespace CombatantSinglePokemon { // ----------------------------------------| Entrypoint Interface | -export interface Patron extends $Select.Bases.ObjectLike { +export interface Patron<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the `id` field on the `Patron` object. Its type is `ID` (a `Scalar`). */ - id?: Patron.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Patron.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `money` field on the `Patron` object. Its type is `Int` (a `Scalar`). */ - money?: Patron.money$Expanded | $Select.SelectAlias.SelectAlias + money?: Patron.money$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Patron` object. Its type is `String` (a `Scalar`). */ - name?: Patron.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Patron.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -779,7 +1285,9 @@ export interface Patron extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Patron$FragmentInline | Patron$FragmentInline[] + ___?: + | Patron$FragmentInline<$Scalars> + | Patron$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -791,37 +1299,76 @@ export interface Patron extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Patron$FragmentInline extends Patron, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Patron$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Patron<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Patron { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type money<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | money$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface money$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `money` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type money$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type money$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | money$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type money = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type name = $Select.Indicator.NoArgsIndicator + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > } // @@ -838,39 +1385,41 @@ export namespace Patron { // ----------------------------------------| Entrypoint Interface | -export interface Pokemon extends $Select.Bases.ObjectLike { +export interface Pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `attack` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - attack?: Pokemon.attack$Expanded | $Select.SelectAlias.SelectAlias + attack?: Pokemon.attack$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `birthday` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - birthday?: Pokemon.birthday$Expanded | $Select.SelectAlias.SelectAlias + birthday?: Pokemon.birthday$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `defense` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - defense?: Pokemon.defense$Expanded | $Select.SelectAlias.SelectAlias + defense?: Pokemon.defense$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `hp` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - hp?: Pokemon.hp$Expanded | $Select.SelectAlias.SelectAlias + hp?: Pokemon.hp$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Pokemon` object. Its type is `ID` (a `Scalar`). */ - id?: Pokemon.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Pokemon.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Pokemon` object. Its type is `String` (a `Scalar`). */ - name?: Pokemon.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Pokemon.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `Pokemon` object. Its type is Object. */ - trainer?: Pokemon.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: Pokemon.trainer$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `type` field on the `Pokemon` object. Its type is Enum. */ - type?: Pokemon.type$Expanded | $Select.SelectAlias.SelectAlias + type?: Pokemon.type$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -880,7 +1429,9 @@ export interface Pokemon extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Pokemon$FragmentInline | Pokemon$FragmentInline[] + ___?: + | Pokemon$FragmentInline<$Scalars> + | Pokemon$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -892,75 +1443,183 @@ export interface Pokemon extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Pokemon$FragmentInline extends Pokemon, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Pokemon$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Pokemon<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Pokemon { + export type attack<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | attack$SelectionSet<$Scalars> + + export interface attack$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `attack` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type attack$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type attack$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | attack$SelectionSet<$Scalars> + > - export type attack = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type birthday<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | birthday$SelectionSet<$Scalars> + + export interface birthday$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `birthday` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type birthday$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type birthday$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | birthday$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type birthday = $Select.Indicator.NoArgsIndicator + export type defense<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | defense$SelectionSet<$Scalars> + + export interface defense$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `defense` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type defense$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type defense$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | defense$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type hp<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | hp$SelectionSet<$Scalars> + + export interface hp$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type defense = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `hp` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type hp$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type hp$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | hp$SelectionSet<$Scalars> + > - export type hp = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> - export type name = $Select.Indicator.NoArgsIndicator + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer /** - * This is the "expanded" version of the `type` type. It is identical except for the fact + * This is the "expanded" version of the `trainer` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type type$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type type<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | type$SelectionSet<$Scalars> - export type type = $Select.Indicator.NoArgsIndicator + export interface type$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `type` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type type$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | type$SelectionSet<$Scalars> + > } // @@ -977,27 +1636,29 @@ export namespace Pokemon { // ----------------------------------------| Entrypoint Interface | -export interface Trainer extends $Select.Bases.ObjectLike { +export interface Trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `class` field on the `Trainer` object. Its type is Enum. */ - class?: Trainer.$class$Expanded | $Select.SelectAlias.SelectAlias + class?: Trainer.$class$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `fans` field on the `Trainer` object. Its type is Object. */ - fans?: Trainer.fans$Expanded | $Select.SelectAlias.SelectAlias + fans?: Trainer.fans$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Trainer` object. Its type is `ID` (a `Scalar`). */ - id?: Trainer.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Trainer.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Trainer` object. Its type is `String` (a `Scalar`). */ - name?: Trainer.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Trainer.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemon` field on the `Trainer` object. Its type is Object. */ - pokemon?: Trainer.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: Trainer.pokemon$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1007,7 +1668,9 @@ export interface Trainer extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Trainer$FragmentInline | Trainer$FragmentInline[] + ___?: + | Trainer$FragmentInline<$Scalars> + | Trainer$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1019,42 +1682,114 @@ export interface Trainer extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Trainer$FragmentInline extends Trainer, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Trainer$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Trainer<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Trainer { + export type $class<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $class$SelectionSet<$Scalars> + + export interface $class$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `$class` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $class$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $class$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $class$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type fans<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = fans$SelectionSet<$Scalars> + + export interface fans$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Patron<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `fans` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type fans$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + fans$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> - export type $class = $Select.Indicator.NoArgsIndicator + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- - export interface fans extends _RefDefs._Patron {} - export type fans$Expanded = fans /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type id = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > - export type name = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > } // @@ -1073,10 +1808,10 @@ export namespace Trainer { // // -export interface Battle { - ___on_BattleRoyale?: BattleRoyale - ___on_BattleTrainer?: BattleTrainer - ___on_BattleWild?: BattleWild +export interface Battle<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_BattleRoyale?: BattleRoyale<$Scalars> + ___on_BattleTrainer?: BattleTrainer<$Scalars> + ___on_BattleWild?: BattleWild<$Scalars> /** * Inline fragments for field groups. @@ -1086,7 +1821,9 @@ export interface Battle { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Battle$FragmentInline | Battle$FragmentInline[] + ___?: + | Battle$FragmentInline<$Scalars> + | Battle$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -1098,7 +1835,9 @@ export interface Battle { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Battle$FragmentInline extends Battle, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Battle$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Battle<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} /** * [1] These definitions serve to allow field selection interfaces to extend their respective object type without @@ -1107,23 +1846,25 @@ export interface Battle$FragmentInline extends Battle, $Select.Directive.$Groups * For example imagine `Query.Foo` field with type also called `Foo`. Our generated interfaces for each field * would end up with an error of `export interface Foo extends Foo ...` */ -export namespace _RefDefs { - export type _Mutation = Mutation - export type _Query = Query - export type _BattleWildResult = BattleWildResult - export type _PokemonType = PokemonType - export type _TrainerClass = TrainerClass - export type _DateFilter = DateFilter - export type _PokemonFilter = PokemonFilter - export type _StringFilter = StringFilter - export type _Being = Being - export type _BattleRoyale = BattleRoyale - export type _BattleTrainer = BattleTrainer - export type _BattleWild = BattleWild - export type _CombatantMultiPokemon = CombatantMultiPokemon - export type _CombatantSinglePokemon = CombatantSinglePokemon - export type _Patron = Patron - export type _Pokemon = Pokemon - export type _Trainer = Trainer - export type _Battle = Battle +export namespace $NamedTypes { + export type $Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Mutation<$Scalars> + export type $Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Query<$Scalars> + export type $BattleWildResult = BattleWildResult + export type $PokemonType = PokemonType + export type $TrainerClass = TrainerClass + export type $DateFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateFilter<$Scalars> + export type $PokemonFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = PokemonFilter<$Scalars> + export type $StringFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = StringFilter<$Scalars> + export type $Being<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Being<$Scalars> + export type $BattleRoyale<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = BattleRoyale<$Scalars> + export type $BattleTrainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = BattleTrainer<$Scalars> + export type $BattleWild<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = BattleWild<$Scalars> + export type $CombatantMultiPokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + CombatantMultiPokemon<$Scalars> + export type $CombatantSinglePokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + CombatantSinglePokemon<$Scalars> + export type $Patron<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Patron<$Scalars> + export type $Pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Pokemon<$Scalars> + export type $Trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Trainer<$Scalars> + export type $Battle<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Battle<$Scalars> } diff --git a/tests/_/schemas/query-only/graffle/modules/Global.ts b/tests/_/schemas/query-only/graffle/modules/Global.ts index 7f14a163b..1e3ecabb7 100644 --- a/tests/_/schemas/query-only/graffle/modules/Global.ts +++ b/tests/_/schemas/query-only/graffle/modules/Global.ts @@ -15,7 +15,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: {} defaultSchemaUrl: null } } diff --git a/tests/_/schemas/query-only/graffle/modules/MethodsDocument.ts b/tests/_/schemas/query-only/graffle/modules/MethodsDocument.ts index 459d5b141..ac1681bcf 100644 --- a/tests/_/schemas/query-only/graffle/modules/MethodsDocument.ts +++ b/tests/_/schemas/query-only/graffle/modules/MethodsDocument.ts @@ -2,9 +2,11 @@ import type * as Utilities from '../../../../../../src/entrypoints/utilities-for import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -14,5 +16,5 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } diff --git a/tests/_/schemas/query-only/graffle/modules/MethodsRoot.ts b/tests/_/schemas/query-only/graffle/modules/MethodsRoot.ts index fa9a6b322..d848429f0 100644 --- a/tests/_/schemas/query-only/graffle/modules/MethodsRoot.ts +++ b/tests/_/schemas/query-only/graffle/modules/MethodsRoot.ts @@ -1,54 +1,58 @@ import { type Simplify } from 'type-fest' import type { InferResult } from '../../../../../../src/entrypoints/schema.js' -import type * as Utils from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface QueryMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query>) => Promise< +export interface QueryMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Query<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Query<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Query' }, '__typename' > > > - id: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.id>) => Promise< + id: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.id<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ id: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ id: $SelectionSet }, Schema<$Context['scalars']>>, 'id' > > > - idNonNull: <$SelectionSet>(selectionSet?: Utils.Exact<$SelectionSet, SelectionSet.Query.idNonNull>) => Promise< + idNonNull: <$SelectionSet>( + selectionSet?: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.idNonNull<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ idNonNull: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ idNonNull: $SelectionSet }, Schema<$Context['scalars']>>, 'idNonNull' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - query: QueryMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + query: QueryMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } diff --git a/tests/_/schemas/query-only/graffle/modules/Scalar.ts b/tests/_/schemas/query-only/graffle/modules/Scalar.ts index 026aa6405..249af6965 100644 --- a/tests/_/schemas/query-only/graffle/modules/Scalar.ts +++ b/tests/_/schemas/query-only/graffle/modules/Scalar.ts @@ -1,3 +1,3 @@ -import type { SchemaKit } from '../../../../../../src/entrypoints/schema.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' export * from '../../../../../../src/layers/1_Schema/Hybrid/types/Scalar/Scalar.js' diff --git a/tests/_/schemas/query-only/graffle/modules/Schema.ts b/tests/_/schemas/query-only/graffle/modules/Schema.ts index b9003b941..cac1e1c47 100644 --- a/tests/_/schemas/query-only/graffle/modules/Schema.ts +++ b/tests/_/schemas/query-only/graffle/modules/Schema.ts @@ -129,11 +129,13 @@ export namespace Schema { // // -import type * as Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Query'] RootUnion: Schema.Query @@ -148,6 +150,6 @@ export interface Schema extends Utilities.SchemaIndexBase { objects: {} unions: {} interfaces: {} - customScalars: Utilities.SchemaIndexBase['customScalars'] - extensions: Utilities.GlobalRegistry.TypeExtensions + scalars: $Scalars + extensions: $$Utilities.GlobalRegistry.TypeExtensions } diff --git a/tests/_/schemas/query-only/graffle/modules/SelectionSets.ts b/tests/_/schemas/query-only/graffle/modules/SelectionSets.ts index 8359c3a65..856b0b75c 100644 --- a/tests/_/schemas/query-only/graffle/modules/SelectionSets.ts +++ b/tests/_/schemas/query-only/graffle/modules/SelectionSets.ts @@ -1,5 +1,5 @@ import type { Select as $Select } from '../../../../../../src/entrypoints/schema.js' -import type * as $Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' +import type * as $$Utilities from '../../../../../../src/entrypoints/utilities-for-generated.js' // // @@ -18,8 +18,8 @@ import type * as $Utilities from '../../../../../../src/entrypoints/utilities-fo // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - query?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + query?: Record> } // @@ -52,15 +52,15 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Query { +export interface Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `id` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - id?: Query.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Query.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `idNonNull` field on the `Query` object. Its type is `ID` (a `Scalar`). */ - idNonNull?: Query.idNonNull$Expanded | $Select.SelectAlias.SelectAlias + idNonNull?: Query.idNonNull$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -70,7 +70,9 @@ export interface Query { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Query$FragmentInline | Query$FragmentInline[] + ___?: + | Query$FragmentInline<$Scalars> + | Query$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -82,28 +84,54 @@ export interface Query { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Query$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Query<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Query { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type idNonNull<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + + export interface idNonNull$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `idNonNull` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type idNonNull$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type idNonNull = $Select.Indicator.NoArgsIndicator + export type idNonNull$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | idNonNull$SelectionSet<$Scalars> + > } /** @@ -113,6 +141,6 @@ export namespace Query { * For example imagine `Query.Foo` field with type also called `Foo`. Our generated interfaces for each field * would end up with an error of `export interface Foo extends Foo ...` */ -export namespace _RefDefs { - export type _Query = Query +export namespace $NamedTypes { + export type $Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Query<$Scalars> } diff --git a/website/graffle/modules/Global.ts b/website/graffle/modules/Global.ts index be87d4f18..5e242e36f 100644 --- a/website/graffle/modules/Global.ts +++ b/website/graffle/modules/Global.ts @@ -15,7 +15,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: {} defaultSchemaUrl: null } } diff --git a/website/graffle/modules/MethodsDocument.ts b/website/graffle/modules/MethodsDocument.ts index 58653ee0e..469191c77 100644 --- a/website/graffle/modules/MethodsDocument.ts +++ b/website/graffle/modules/MethodsDocument.ts @@ -2,9 +2,11 @@ import type * as Utilities from 'graffle/utilities-for-generated' import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -14,5 +16,5 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } diff --git a/website/graffle/modules/MethodsRoot.ts b/website/graffle/modules/MethodsRoot.ts index 235fb2f82..76601950d 100644 --- a/website/graffle/modules/MethodsRoot.ts +++ b/website/graffle/modules/MethodsRoot.ts @@ -1,90 +1,102 @@ import type { InferResult } from 'graffle/schema' -import type * as Utils from 'graffle/utilities-for-generated' +import type * as $$Utilities from 'graffle/utilities-for-generated' import { type Simplify } from 'type-fest' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface QueryMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query>) => Promise< +export interface QueryMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Query<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Query<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Query' }, '__typename' > > > - continent: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.continent>) => Promise< + continent: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.continent<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ continent: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ continent: $SelectionSet }, Schema<$Context['scalars']>>, 'continent' > > > - continents: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.continents>) => Promise< + continents: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.continents<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ continents: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ continents: $SelectionSet }, Schema<$Context['scalars']>>, 'continents' > > > - countries: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.countries>) => Promise< + countries: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.countries<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ countries: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ countries: $SelectionSet }, Schema<$Context['scalars']>>, 'countries' > > > - country: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.country>) => Promise< + country: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.country<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ country: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ country: $SelectionSet }, Schema<$Context['scalars']>>, 'country' > > > - language: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.language>) => Promise< + language: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.language<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ language: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ language: $SelectionSet }, Schema<$Context['scalars']>>, 'language' > > > - languages: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.languages>) => Promise< + languages: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.languages<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ languages: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ languages: $SelectionSet }, Schema<$Context['scalars']>>, 'languages' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - query: QueryMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + query: QueryMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } diff --git a/website/graffle/modules/Scalar.ts b/website/graffle/modules/Scalar.ts index 0e97de641..ef72f421e 100644 --- a/website/graffle/modules/Scalar.ts +++ b/website/graffle/modules/Scalar.ts @@ -1,3 +1,3 @@ -import type { SchemaKit } from 'graffle/schema' +import type * as $$Utilities from 'graffle/utilities-for-generated' export * from 'graffle/schema/scalars' diff --git a/website/graffle/modules/Schema.ts b/website/graffle/modules/Schema.ts index be4c7381f..113faf12d 100644 --- a/website/graffle/modules/Schema.ts +++ b/website/graffle/modules/Schema.ts @@ -237,11 +237,13 @@ export namespace Schema { // // -import type * as Utilities from 'graffle/utilities-for-generated' +import type * as $$Utilities from 'graffle/utilities-for-generated' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Query'] RootUnion: Schema.Query @@ -267,6 +269,6 @@ export interface Schema extends Utilities.SchemaIndexBase { } unions: {} interfaces: {} - customScalars: Utilities.SchemaIndexBase['customScalars'] - extensions: Utilities.GlobalRegistry.TypeExtensions + scalars: $Scalars + extensions: $$Utilities.GlobalRegistry.TypeExtensions } diff --git a/website/graffle/modules/SelectionSets.ts b/website/graffle/modules/SelectionSets.ts index 0c4db77b1..fcd69927f 100644 --- a/website/graffle/modules/SelectionSets.ts +++ b/website/graffle/modules/SelectionSets.ts @@ -1,5 +1,5 @@ import type { Select as $Select } from 'graffle/schema' -import type * as $Utilities from 'graffle/utilities-for-generated' +import type * as $$Utilities from 'graffle/utilities-for-generated' // // @@ -18,8 +18,8 @@ import type * as $Utilities from 'graffle/utilities-for-generated' // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - query?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + query?: Record> } // @@ -52,31 +52,31 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Query { +export interface Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `continent` field on the `Query` object. Its type is Object. */ - continent?: Query.continent | $Select.SelectAlias.SelectAlias + continent?: Query.continent<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `continents` field on the `Query` object. Its type is Object. */ - continents?: Query.continents$Expanded | $Select.SelectAlias.SelectAlias + continents?: Query.continents$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `countries` field on the `Query` object. Its type is Object. */ - countries?: Query.countries$Expanded | $Select.SelectAlias.SelectAlias + countries?: Query.countries$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `country` field on the `Query` object. Its type is Object. */ - country?: Query.country | $Select.SelectAlias.SelectAlias + country?: Query.country<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `language` field on the `Query` object. Its type is Object. */ - language?: Query.language | $Select.SelectAlias.SelectAlias + language?: Query.language<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `languages` field on the `Query` object. Its type is Object. */ - languages?: Query.languages$Expanded | $Select.SelectAlias.SelectAlias + languages?: Query.languages$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -86,7 +86,9 @@ export interface Query { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Query$FragmentInline | Query$FragmentInline[] + ___?: + | Query$FragmentInline<$Scalars> + | Query$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -98,71 +100,180 @@ export interface Query { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Query$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Query<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Query { - export interface continent extends _RefDefs._Continent { + export type continent<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = continent$SelectionSet<$Scalars> + + export interface continent$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Continent<$Scalars> + { /** - * Arguments for `continent` field. - * All arguments are required so you must include this. + * Arguments for `continent` field. All arguments are required so you must include this. */ - $: { - code: string - } + $: continent$Arguments<$Scalars> + } + + export interface continent$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + code: string } - export type continent$Expanded = continent - export interface continents extends _RefDefs._Continent { + + // --- expanded --- + + /** + * This is the "expanded" version of the `continent` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type continent$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + continent$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type continents<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = continents$SelectionSet< + $Scalars + > + + export interface continents$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Continent<$Scalars> + { /** - * Arguments for `continents` field. - * No arguments are required so you may omit this. + * Arguments for `continents` field. No arguments are required so you may omit this. */ - $?: { - filter?: _RefDefs._ContinentFilterInput | undefined | null - } + $?: continents$Arguments<$Scalars> } - export type continents$Expanded = continents - export interface countries extends _RefDefs._Country { + + export interface continents$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + filter?: $NamedTypes.$ContinentFilterInput<$Scalars> | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `continents` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type continents$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + continents$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type countries<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = countries$SelectionSet<$Scalars> + + export interface countries$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Country<$Scalars> + { /** - * Arguments for `countries` field. - * No arguments are required so you may omit this. + * Arguments for `countries` field. No arguments are required so you may omit this. */ - $?: { - filter?: _RefDefs._CountryFilterInput | undefined | null - } + $?: countries$Arguments<$Scalars> } - export type countries$Expanded = countries - export interface country extends _RefDefs._Country { + + export interface countries$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + filter?: $NamedTypes.$CountryFilterInput<$Scalars> | undefined | null + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `countries` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type countries$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + countries$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type country<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = country$SelectionSet<$Scalars> + + export interface country$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Country<$Scalars> + { /** - * Arguments for `country` field. - * All arguments are required so you must include this. + * Arguments for `country` field. All arguments are required so you must include this. */ - $: { - code: string - } + $: country$Arguments<$Scalars> + } + + export interface country$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + code: string } - export type country$Expanded = country - export interface language extends _RefDefs._Language { + + // --- expanded --- + + /** + * This is the "expanded" version of the `country` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type country$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + country$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type language<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = language$SelectionSet<$Scalars> + + export interface language$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Language<$Scalars> + { /** - * Arguments for `language` field. - * All arguments are required so you must include this. + * Arguments for `language` field. All arguments are required so you must include this. */ - $: { - code: string - } + $: language$Arguments<$Scalars> } - export type language$Expanded = language - export interface languages extends _RefDefs._Language { + + export interface language$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + code: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `language` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type language$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + language$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type languages<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = languages$SelectionSet<$Scalars> + + export interface languages$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Language<$Scalars> + { /** - * Arguments for `languages` field. - * No arguments are required so you may omit this. + * Arguments for `languages` field. No arguments are required so you may omit this. */ - $?: { - filter?: _RefDefs._LanguageFilterInput | undefined | null - } + $?: languages$Arguments<$Scalars> + } + + export interface languages$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + filter?: $NamedTypes.$LanguageFilterInput<$Scalars> | undefined | null } - export type languages$Expanded = languages + + // --- expanded --- + + /** + * This is the "expanded" version of the `languages` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type languages$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + languages$SelectionSet<$Scalars> + > } // @@ -181,22 +292,22 @@ export namespace Query { // // -export interface ContinentFilterInput { - code?: _RefDefs._StringQueryOperatorInput | undefined | null +export interface ContinentFilterInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + code?: $NamedTypes.$StringQueryOperatorInput<$Scalars> | undefined | null } -export interface CountryFilterInput { - code?: _RefDefs._StringQueryOperatorInput | undefined | null - continent?: _RefDefs._StringQueryOperatorInput | undefined | null - currency?: _RefDefs._StringQueryOperatorInput | undefined | null - name?: _RefDefs._StringQueryOperatorInput | undefined | null +export interface CountryFilterInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + code?: $NamedTypes.$StringQueryOperatorInput<$Scalars> | undefined | null + continent?: $NamedTypes.$StringQueryOperatorInput<$Scalars> | undefined | null + currency?: $NamedTypes.$StringQueryOperatorInput<$Scalars> | undefined | null + name?: $NamedTypes.$StringQueryOperatorInput<$Scalars> | undefined | null } -export interface LanguageFilterInput { - code?: _RefDefs._StringQueryOperatorInput | undefined | null +export interface LanguageFilterInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + code?: $NamedTypes.$StringQueryOperatorInput<$Scalars> | undefined | null } -export interface StringQueryOperatorInput { +export interface StringQueryOperatorInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { eq?: string | undefined | null in?: Array | undefined | null ne?: string | undefined | null @@ -234,19 +345,21 @@ export interface StringQueryOperatorInput { // ----------------------------------------| Entrypoint Interface | -export interface Continent extends $Select.Bases.ObjectLike { +export interface Continent<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `code` field on the `Continent` object. Its type is `ID` (a `Scalar`). */ - code?: Continent.code$Expanded | $Select.SelectAlias.SelectAlias + code?: Continent.code$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `countries` field on the `Continent` object. Its type is Object. */ - countries?: Continent.countries$Expanded | $Select.SelectAlias.SelectAlias + countries?: Continent.countries$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Continent` object. Its type is `String` (a `Scalar`). */ - name?: Continent.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Continent.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -256,7 +369,9 @@ export interface Continent extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Continent$FragmentInline | Continent$FragmentInline[] + ___?: + | Continent$FragmentInline<$Scalars> + | Continent$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -268,30 +383,73 @@ export interface Continent extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Continent$FragmentInline extends Continent, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Continent$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Continent<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Continent { + export type code<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + + export interface code$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `code` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type code$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type code$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type code = $Select.Indicator.NoArgsIndicator + export type countries<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = countries$SelectionSet<$Scalars> + + export interface countries$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Country<$Scalars> + {} + + // --- expanded --- - export interface countries extends _RefDefs._Country {} - export type countries$Expanded = countries /** - * This is the "expanded" version of the `name` type. It is identical except for the fact + * This is the "expanded" version of the `countries` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type countries$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + countries$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type name = $Select.Indicator.NoArgsIndicator + // --- expanded --- + + /** + * This is the "expanded" version of the `name` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > } // @@ -308,67 +466,71 @@ export namespace Continent { // ----------------------------------------| Entrypoint Interface | -export interface Country extends $Select.Bases.ObjectLike { +export interface Country<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `awsRegion` field on the `Country` object. Its type is `String` (a `Scalar`). */ - awsRegion?: Country.awsRegion$Expanded | $Select.SelectAlias.SelectAlias + awsRegion?: Country.awsRegion$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `capital` field on the `Country` object. Its type is `String` (a `Scalar`). */ - capital?: Country.capital$Expanded | $Select.SelectAlias.SelectAlias + capital?: Country.capital$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `code` field on the `Country` object. Its type is `ID` (a `Scalar`). */ - code?: Country.code$Expanded | $Select.SelectAlias.SelectAlias + code?: Country.code$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `continent` field on the `Country` object. Its type is Object. */ - continent?: Country.continent$Expanded | $Select.SelectAlias.SelectAlias + continent?: Country.continent$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `currencies` field on the `Country` object. Its type is `String` (a `Scalar`). */ - currencies?: Country.currencies$Expanded | $Select.SelectAlias.SelectAlias + currencies?: Country.currencies$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `currency` field on the `Country` object. Its type is `String` (a `Scalar`). */ - currency?: Country.currency$Expanded | $Select.SelectAlias.SelectAlias + currency?: Country.currency$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `emoji` field on the `Country` object. Its type is `String` (a `Scalar`). */ - emoji?: Country.emoji$Expanded | $Select.SelectAlias.SelectAlias + emoji?: Country.emoji$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `emojiU` field on the `Country` object. Its type is `String` (a `Scalar`). */ - emojiU?: Country.emojiU$Expanded | $Select.SelectAlias.SelectAlias + emojiU?: Country.emojiU$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `languages` field on the `Country` object. Its type is Object. */ - languages?: Country.languages$Expanded | $Select.SelectAlias.SelectAlias + languages?: Country.languages$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Country` object. Its type is `String` (a `Scalar`). */ - name?: Country.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Country.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `native` field on the `Country` object. Its type is `String` (a `Scalar`). */ - native?: Country.native$Expanded | $Select.SelectAlias.SelectAlias + native?: Country.native$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `phone` field on the `Country` object. Its type is `String` (a `Scalar`). */ - phone?: Country.phone$Expanded | $Select.SelectAlias.SelectAlias + phone?: Country.phone$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `phones` field on the `Country` object. Its type is `String` (a `Scalar`). */ - phones?: Country.phones$Expanded | $Select.SelectAlias.SelectAlias + phones?: Country.phones$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `states` field on the `Country` object. Its type is Object. */ - states?: Country.states$Expanded | $Select.SelectAlias.SelectAlias + states?: Country.states$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `subdivisions` field on the `Country` object. Its type is Object. */ - subdivisions?: Country.subdivisions$Expanded | $Select.SelectAlias.SelectAlias + subdivisions?: + | Country.subdivisions$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -378,7 +540,9 @@ export interface Country extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Country$FragmentInline | Country$FragmentInline[] + ___?: + | Country$FragmentInline<$Scalars> + | Country$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -390,131 +554,340 @@ export interface Country extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Country$FragmentInline extends Country, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Country$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Country<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Country { + export type awsRegion<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | awsRegion$SelectionSet<$Scalars> + + export interface awsRegion$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `awsRegion` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type awsRegion$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type awsRegion$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | awsRegion$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type capital<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | capital$SelectionSet<$Scalars> + + export interface capital$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type awsRegion = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `capital` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type capital$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type capital$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | capital$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type code<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> - export type capital = $Select.Indicator.NoArgsIndicator + export interface code$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `code` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type code$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type code$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type continent<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = continent$SelectionSet<$Scalars> - export type code = $Select.Indicator.NoArgsIndicator + export interface continent$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Continent<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `continent` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type continent$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + continent$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type currencies<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | currencies$SelectionSet<$Scalars> + + export interface currencies$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- - export interface continent extends _RefDefs._Continent {} - export type continent$Expanded = continent /** * This is the "expanded" version of the `currencies` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type currencies$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type currencies$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | currencies$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type currency<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | currency$SelectionSet<$Scalars> - export type currencies = $Select.Indicator.NoArgsIndicator + export interface currency$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `currency` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type currency$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type currency$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | currency$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type emoji<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | emoji$SelectionSet<$Scalars> - export type currency = $Select.Indicator.NoArgsIndicator + export interface emoji$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `emoji` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type emoji$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type emoji$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | emoji$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type emojiU<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | emojiU$SelectionSet<$Scalars> - export type emoji = $Select.Indicator.NoArgsIndicator + export interface emojiU$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `emojiU` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type emojiU$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type emojiU$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | emojiU$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type emojiU = $Select.Indicator.NoArgsIndicator + export type languages<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = languages$SelectionSet<$Scalars> + + export interface languages$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Language<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `languages` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type languages$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + languages$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + { + /** + * Arguments for `name` field. No arguments are required so you may omit this. + */ + $?: name$Arguments<$Scalars> + } - export interface languages extends _RefDefs._Language {} - export type languages$Expanded = languages - export type name$SelectionSetArguments = { + export interface name$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { lang?: string | undefined | null } - export type name$SelectionSet = $Utilities.Simplify< - $Select.Bases.Base & { - /** - * Arguments for `name` field. - * No arguments are required so you may omit this. - */ - $?: name$SelectionSetArguments - } - > + + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Utilities.UnionExpanded<$Select.Indicator.Indicator | name$SelectionSet> + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type name = $Select.Indicator.Indicator | name$SelectionSet + export type native<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | native$SelectionSet<$Scalars> + + export interface native$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `native` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type native$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type native$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | native$SelectionSet<$Scalars> + > - export type native = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type phone<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | phone$SelectionSet<$Scalars> + + export interface phone$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `phone` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type phone$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type phone$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | phone$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type phones<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | phones$SelectionSet<$Scalars> + + export interface phones$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type phone = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `phones` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type phones$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type phones$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | phones$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type states<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = states$SelectionSet<$Scalars> + + export interface states$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$State<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `states` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type states$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + states$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type subdivisions<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = subdivisions$SelectionSet< + $Scalars + > - export type phones = $Select.Indicator.NoArgsIndicator + export interface subdivisions$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Subdivision<$Scalars> + {} - export interface states extends _RefDefs._State {} - export type states$Expanded = states - export interface subdivisions extends _RefDefs._Subdivision {} - export type subdivisions$Expanded = subdivisions + // --- expanded --- + + /** + * This is the "expanded" version of the `subdivisions` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type subdivisions$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + subdivisions$SelectionSet<$Scalars> + > } // @@ -531,23 +904,25 @@ export namespace Country { // ----------------------------------------| Entrypoint Interface | -export interface Language extends $Select.Bases.ObjectLike { +export interface Language<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `code` field on the `Language` object. Its type is `ID` (a `Scalar`). */ - code?: Language.code$Expanded | $Select.SelectAlias.SelectAlias + code?: Language.code$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Language` object. Its type is `String` (a `Scalar`). */ - name?: Language.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Language.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `native` field on the `Language` object. Its type is `String` (a `Scalar`). */ - native?: Language.native$Expanded | $Select.SelectAlias.SelectAlias + native?: Language.native$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `rtl` field on the `Language` object. Its type is `Boolean` (a `Scalar`). */ - rtl?: Language.rtl$Expanded | $Select.SelectAlias.SelectAlias + rtl?: Language.rtl$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -557,7 +932,9 @@ export interface Language extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Language$FragmentInline | Language$FragmentInline[] + ___?: + | Language$FragmentInline<$Scalars> + | Language$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -569,46 +946,98 @@ export interface Language extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Language$FragmentInline extends Language, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Language$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Language<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Language { + export type code<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + + export interface code$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `code` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type code$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type code$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> - export type code = $Select.Indicator.NoArgsIndicator + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type name = $Select.Indicator.NoArgsIndicator + export type native<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | native$SelectionSet<$Scalars> + + export interface native$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `native` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type native$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type native$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | native$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type native = $Select.Indicator.NoArgsIndicator + export type rtl<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | rtl$SelectionSet<$Scalars> + + export interface rtl$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `rtl` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type rtl$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type rtl = $Select.Indicator.NoArgsIndicator + export type rtl$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | rtl$SelectionSet<$Scalars> + > } // @@ -625,19 +1054,19 @@ export namespace Language { // ----------------------------------------| Entrypoint Interface | -export interface State extends $Select.Bases.ObjectLike { +export interface State<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the `code` field on the `State` object. Its type is `String` (a `Scalar`). */ - code?: State.code$Expanded | $Select.SelectAlias.SelectAlias + code?: State.code$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `country` field on the `State` object. Its type is Object. */ - country?: State.country$Expanded | $Select.SelectAlias.SelectAlias + country?: State.country$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `State` object. Its type is `String` (a `Scalar`). */ - name?: State.name$Expanded | $Select.SelectAlias.SelectAlias + name?: State.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -647,7 +1076,9 @@ export interface State extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: State$FragmentInline | State$FragmentInline[] + ___?: + | State$FragmentInline<$Scalars> + | State$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -659,30 +1090,73 @@ export interface State extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface State$FragmentInline extends State, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface State$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends State<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace State { + export type code<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + + export interface code$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `code` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type code$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type code$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type country<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = country$SelectionSet<$Scalars> + + export interface country$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Country<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `country` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type country$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + country$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type code = $Select.Indicator.NoArgsIndicator + // --- expanded --- - export interface country extends _RefDefs._Country {} - export type country$Expanded = country /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type name = $Select.Indicator.NoArgsIndicator + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > } // @@ -699,19 +1173,21 @@ export namespace State { // ----------------------------------------| Entrypoint Interface | -export interface Subdivision extends $Select.Bases.ObjectLike { +export interface Subdivision<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `code` field on the `Subdivision` object. Its type is `ID` (a `Scalar`). */ - code?: Subdivision.code$Expanded | $Select.SelectAlias.SelectAlias + code?: Subdivision.code$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `emoji` field on the `Subdivision` object. Its type is `String` (a `Scalar`). */ - emoji?: Subdivision.emoji$Expanded | $Select.SelectAlias.SelectAlias + emoji?: Subdivision.emoji$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Subdivision` object. Its type is `String` (a `Scalar`). */ - name?: Subdivision.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Subdivision.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -721,7 +1197,9 @@ export interface Subdivision extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Subdivision$FragmentInline | Subdivision$FragmentInline[] + ___?: + | Subdivision$FragmentInline<$Scalars> + | Subdivision$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -733,37 +1211,76 @@ export interface Subdivision extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Subdivision$FragmentInline extends Subdivision, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Subdivision$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Subdivision<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Subdivision { + export type code<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + + export interface code$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `code` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type code$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type code$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | code$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type code = $Select.Indicator.NoArgsIndicator + export type emoji<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | emoji$SelectionSet<$Scalars> + + export interface emoji$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `emoji` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type emoji$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type emoji$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | emoji$SelectionSet<$Scalars> + > - export type emoji = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type name = $Select.Indicator.NoArgsIndicator + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > } /** @@ -773,15 +1290,21 @@ export namespace Subdivision { * For example imagine `Query.Foo` field with type also called `Foo`. Our generated interfaces for each field * would end up with an error of `export interface Foo extends Foo ...` */ -export namespace _RefDefs { - export type _Query = Query - export type _ContinentFilterInput = ContinentFilterInput - export type _CountryFilterInput = CountryFilterInput - export type _LanguageFilterInput = LanguageFilterInput - export type _StringQueryOperatorInput = StringQueryOperatorInput - export type _Continent = Continent - export type _Country = Country - export type _Language = Language - export type _State = State - export type _Subdivision = Subdivision +export namespace $NamedTypes { + export type $Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Query<$Scalars> + export type $ContinentFilterInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + ContinentFilterInput<$Scalars> + export type $CountryFilterInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = CountryFilterInput< + $Scalars + > + export type $LanguageFilterInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = LanguageFilterInput< + $Scalars + > + export type $StringQueryOperatorInput<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + StringQueryOperatorInput<$Scalars> + export type $Continent<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Continent<$Scalars> + export type $Country<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Country<$Scalars> + export type $Language<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Language<$Scalars> + export type $State<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = State<$Scalars> + export type $Subdivision<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Subdivision<$Scalars> } diff --git a/website/pokemon/modules/Global.ts b/website/pokemon/modules/Global.ts index 14e54e99b..d6045172e 100644 --- a/website/pokemon/modules/Global.ts +++ b/website/pokemon/modules/Global.ts @@ -15,7 +15,6 @@ declare global { Document: MethodsDocument.BuilderMethodsDocumentFn Root: MethodsRoot.BuilderMethodsRootFn } - customScalars: {} /** * http://localhost:3000/graphql diff --git a/website/pokemon/modules/MethodsDocument.ts b/website/pokemon/modules/MethodsDocument.ts index 58653ee0e..469191c77 100644 --- a/website/pokemon/modules/MethodsDocument.ts +++ b/website/pokemon/modules/MethodsDocument.ts @@ -2,9 +2,11 @@ import type * as Utilities from 'graffle/utilities-for-generated' import type { Schema } from './Schema.js' import type * as SelectionSets from './SelectionSets.js' -export interface Document<$Config extends Utilities.Config> { - <$Document>(document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document>): Utilities.DocumentRunner< - $Config, +export interface Document<$Context extends Utilities.ClientContext> { + <$Document>( + document: Utilities.ExactNonEmpty<$Document, SelectionSets.$Document<$Context['scalars']>>, + ): Utilities.DocumentRunner< + $Context, Schema, // @ts-expect-error We use Exact instead of constraint on this function. TypeScript does not see that as // Satisfying the constraint on the DocumentRunner type. @@ -14,5 +16,5 @@ export interface Document<$Config extends Utilities.Config> { export interface BuilderMethodsDocumentFn extends Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: Document + return: Document } diff --git a/website/pokemon/modules/MethodsRoot.ts b/website/pokemon/modules/MethodsRoot.ts index 47748c26d..1f1a1c902 100644 --- a/website/pokemon/modules/MethodsRoot.ts +++ b/website/pokemon/modules/MethodsRoot.ts @@ -1,131 +1,147 @@ import type { InferResult } from 'graffle/schema' -import type * as Utils from 'graffle/utilities-for-generated' +import type * as $$Utilities from 'graffle/utilities-for-generated' import { type Simplify } from 'type-fest' import type { Schema } from './Schema.js' import type * as SelectionSet from './SelectionSets.js' -export interface MutationMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation>) => Promise< +export interface MutationMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Mutation<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Mutation<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Mutation' }, '__typename' > > > - addPokemon: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Mutation.addPokemon>) => Promise< + addPokemon: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Mutation.addPokemon<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Mutation<{ addPokemon: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Mutation<{ addPokemon: $SelectionSet }, Schema<$Context['scalars']>>, 'addPokemon' > > > } -export interface QueryMethods<$Config extends Utils.Config> { - // todo Use a static type here? - $batch: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query>) => Promise< +export interface QueryMethods<$Context extends $$Utilities.ClientContext> { + $batch: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutput< - $Config, - InferResult.Query<$SelectionSet, Schema> + $$Utilities.HandleOutput< + $Context, + InferResult.Query<$SelectionSet, Schema<$Context['scalars']>> > > > - // todo Use a static type here? __typename: () => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, + $$Utilities.HandleOutputGraffleRootField< + $Context, { __typename: 'Query' }, '__typename' > > > - battles: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.battles>) => Promise< + battles: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.battles<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ battles: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ battles: $SelectionSet }, Schema<$Context['scalars']>>, 'battles' > > > - beings: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.beings>) => Promise< + beings: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.beings<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ beings: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ beings: $SelectionSet }, Schema<$Context['scalars']>>, 'beings' > > > - pokemon: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.pokemon>) => Promise< + pokemon: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.pokemon<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ pokemon: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ pokemon: $SelectionSet }, Schema<$Context['scalars']>>, 'pokemon' > > > - pokemonByName: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.pokemonByName>) => Promise< + pokemonByName: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.pokemonByName<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ pokemonByName: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ pokemonByName: $SelectionSet }, Schema<$Context['scalars']>>, 'pokemonByName' > > > - pokemons: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.pokemons>) => Promise< + pokemons: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.pokemons<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ pokemons: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ pokemons: $SelectionSet }, Schema<$Context['scalars']>>, 'pokemons' > > > - trainerByName: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.trainerByName>) => Promise< + trainerByName: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.trainerByName<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ trainerByName: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ trainerByName: $SelectionSet }, Schema<$Context['scalars']>>, 'trainerByName' > > > - trainers: <$SelectionSet>(selectionSet: Utils.Exact<$SelectionSet, SelectionSet.Query.trainers>) => Promise< + trainers: <$SelectionSet>( + selectionSet: $$Utilities.Exact<$SelectionSet, SelectionSet.Query.trainers<$Context['scalars']>>, + ) => Promise< Simplify< - Utils.HandleOutputGraffleRootField< - $Config, - InferResult.Query<{ trainers: $SelectionSet }, Schema>, + $$Utilities.HandleOutputGraffleRootField< + $Context, + InferResult.Query<{ trainers: $SelectionSet }, Schema<$Context['scalars']>>, 'trainers' > > > } -export interface BuilderMethodsRoot<$Config extends Utils.Config> { - mutation: MutationMethods<$Config> - query: QueryMethods<$Config> +export interface BuilderMethodsRoot<$Context extends $$Utilities.ClientContext> { + mutation: MutationMethods<$Context> + query: QueryMethods<$Context> } -export interface BuilderMethodsRootFn extends Utils.TypeFunction.Fn { +export interface BuilderMethodsRootFn extends $$Utilities.TypeFunction.Fn { // @ts-expect-error parameter is Untyped. - return: BuilderMethodsRoot + return: BuilderMethodsRoot } diff --git a/website/pokemon/modules/Scalar.ts b/website/pokemon/modules/Scalar.ts index 0e97de641..ef72f421e 100644 --- a/website/pokemon/modules/Scalar.ts +++ b/website/pokemon/modules/Scalar.ts @@ -1,3 +1,3 @@ -import type { SchemaKit } from 'graffle/schema' +import type * as $$Utilities from 'graffle/utilities-for-generated' export * from 'graffle/schema/scalars' diff --git a/website/pokemon/modules/Schema.ts b/website/pokemon/modules/Schema.ts index ecb221efc..85aa7a95c 100644 --- a/website/pokemon/modules/Schema.ts +++ b/website/pokemon/modules/Schema.ts @@ -260,11 +260,13 @@ export namespace Schema { // // -import type * as Utilities from 'graffle/utilities-for-generated' +import type * as $$Utilities from 'graffle/utilities-for-generated' import type * as Data from './Data.js' import type * as MethodsRoot from './MethodsRoot.js' -export interface Schema extends Utilities.SchemaIndexBase { +export interface Schema<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $$Utilities.SchemaIndexBase +{ name: Data.Name RootTypesPresent: ['Mutation', 'Query'] RootUnion: Schema.Mutation | Schema.Query @@ -306,6 +308,6 @@ export interface Schema extends Utilities.SchemaIndexBase { interfaces: { Being: Schema.Being } - customScalars: Utilities.SchemaIndexBase['customScalars'] - extensions: Utilities.GlobalRegistry.TypeExtensions + scalars: $Scalars + extensions: $$Utilities.GlobalRegistry.TypeExtensions } diff --git a/website/pokemon/modules/SelectionSets.ts b/website/pokemon/modules/SelectionSets.ts index 8b06e7066..06f5b0e6e 100644 --- a/website/pokemon/modules/SelectionSets.ts +++ b/website/pokemon/modules/SelectionSets.ts @@ -1,5 +1,5 @@ import type { Select as $Select } from 'graffle/schema' -import type * as $Utilities from 'graffle/utilities-for-generated' +import type * as $$Utilities from 'graffle/utilities-for-generated' // // @@ -18,9 +18,9 @@ import type * as $Utilities from 'graffle/utilities-for-generated' // // Prefix with $ because this is not a schema type. A user could have a schema type named "Document" that this would conflict with. -export interface $Document { - query?: Record - mutation?: Record +export interface $Document<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + query?: Record> + mutation?: Record> } // @@ -53,11 +53,11 @@ export interface $Document { // ----------------------------------------| Entrypoint Interface | -export interface Mutation { +export interface Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `addPokemon` field on the `Mutation` object. Its type is Object. */ - addPokemon?: Mutation.addPokemon | $Select.SelectAlias.SelectAlias + addPokemon?: Mutation.addPokemon<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -67,7 +67,9 @@ export interface Mutation { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Mutation$FragmentInline | Mutation$FragmentInline[] + ___?: + | Mutation$FragmentInline<$Scalars> + | Mutation$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -79,25 +81,44 @@ export interface Mutation { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Mutation$FragmentInline extends Mutation, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Mutation$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Mutation<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Mutation { - export interface addPokemon extends _RefDefs._Pokemon { + export type addPokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = addPokemon$SelectionSet< + $Scalars + > + + export interface addPokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + { /** - * Arguments for `addPokemon` field. - * Some (2/5) arguments are required so you must include this. + * Arguments for `addPokemon` field. Some (2/5) arguments are required so you must include this. */ - $: { - attack?: number | undefined | null - defense?: number | undefined | null - hp?: number | undefined | null - name: string - $type: _RefDefs._PokemonType - } + $: addPokemon$Arguments<$Scalars> } - export type addPokemon$Expanded = addPokemon + + export interface addPokemon$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + attack?: number | undefined | null + defense?: number | undefined | null + hp?: number | undefined | null + name: string + $type: $NamedTypes.$PokemonType + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `addPokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type addPokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + addPokemon$SelectionSet<$Scalars> + > } // @@ -114,35 +135,35 @@ export namespace Mutation { // ----------------------------------------| Entrypoint Interface | -export interface Query { +export interface Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { /** * Select the `battles` field on the `Query` object. Its type is Union. */ - battles?: Query.battles$Expanded | $Select.SelectAlias.SelectAlias + battles?: Query.battles$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `beings` field on the `Query` object. Its type is Interface. */ - beings?: Query.beings$Expanded | $Select.SelectAlias.SelectAlias + beings?: Query.beings$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemon` field on the `Query` object. Its type is Object. */ - pokemon?: Query.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: Query.pokemon$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemonByName` field on the `Query` object. Its type is Object. */ - pokemonByName?: Query.pokemonByName | $Select.SelectAlias.SelectAlias + pokemonByName?: Query.pokemonByName<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemons` field on the `Query` object. Its type is Object. */ - pokemons?: Query.pokemons$Expanded | $Select.SelectAlias.SelectAlias + pokemons?: Query.pokemons$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainerByName` field on the `Query` object. Its type is Object. */ - trainerByName?: Query.trainerByName | $Select.SelectAlias.SelectAlias + trainerByName?: Query.trainerByName<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainers` field on the `Query` object. Its type is Object. */ - trainers?: Query.trainers$Expanded | $Select.SelectAlias.SelectAlias + trainers?: Query.trainers$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -152,7 +173,9 @@ export interface Query { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Query$FragmentInline | Query$FragmentInline[] + ___?: + | Query$FragmentInline<$Scalars> + | Query$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -164,49 +187,176 @@ export interface Query { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Query$FragmentInline extends Query, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Query$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Query<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Query { - export interface battles extends _RefDefs._Battle {} - export type battles$Expanded = battles - export interface beings extends _RefDefs._Being {} - export type beings$Expanded = beings - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon - export interface pokemonByName extends _RefDefs._Pokemon { + export type battles<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = battles$SelectionSet<$Scalars> + + export interface battles$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Battle<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `battles` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type battles$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + battles$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type beings<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = beings$SelectionSet<$Scalars> + + export interface beings$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Being<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `beings` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type beings$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + beings$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type pokemonByName<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemonByName$SelectionSet< + $Scalars + > + + export interface pokemonByName$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + { /** - * Arguments for `pokemonByName` field. - * All arguments are required so you must include this. + * Arguments for `pokemonByName` field. All arguments are required so you must include this. */ - $: { - name: string - } + $: pokemonByName$Arguments<$Scalars> } - export type pokemonByName$Expanded = pokemonByName - export interface pokemons extends _RefDefs._Pokemon { + + export interface pokemonByName$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + name: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemonByName` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemonByName$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + pokemonByName$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type pokemons<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemons$SelectionSet<$Scalars> + + export interface pokemons$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + { /** - * Arguments for `pokemons` field. - * No arguments are required so you may omit this. + * Arguments for `pokemons` field. No arguments are required so you may omit this. */ - $?: { - filter?: _RefDefs._PokemonFilter | undefined | null - } + $?: pokemons$Arguments<$Scalars> + } + + export interface pokemons$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + filter?: $NamedTypes.$PokemonFilter<$Scalars> | undefined | null } - export type pokemons$Expanded = pokemons - export interface trainerByName extends _RefDefs._Trainer { + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemons` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemons$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemons$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainerByName<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainerByName$SelectionSet< + $Scalars + > + + export interface trainerByName$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + { /** - * Arguments for `trainerByName` field. - * All arguments are required so you must include this. + * Arguments for `trainerByName` field. All arguments are required so you must include this. */ - $: { - name: string - } + $: trainerByName$Arguments<$Scalars> } - export type trainerByName$Expanded = trainerByName - export interface trainers extends _RefDefs._Trainer {} - export type trainers$Expanded = trainers + + export interface trainerByName$Arguments<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + name: string + } + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainerByName` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainerByName$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + trainerByName$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainers<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainers$SelectionSet<$Scalars> + + export interface trainers$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainers` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainers$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainers$SelectionSet<$Scalars> + > } // @@ -260,17 +410,17 @@ export type TrainerClass = // // -export interface DateFilter { +export interface DateFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { gte?: number | undefined | null lte?: number | undefined | null } -export interface PokemonFilter { - birthday?: _RefDefs._DateFilter | undefined | null - name?: _RefDefs._StringFilter | undefined | null +export interface PokemonFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + birthday?: $NamedTypes.$DateFilter<$Scalars> | undefined | null + name?: $NamedTypes.$StringFilter<$Scalars> | undefined | null } -export interface StringFilter { +export interface StringFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { contains?: string | undefined | null in?: Array | undefined | null } @@ -291,16 +441,15 @@ export interface StringFilter { // // -// -------------- -// Interface Type Being -// -------------- +// Interface Type: Being +// -------------------------------------------------------------------------------------------------- -export interface Being extends $Select.Bases.ObjectLike { - id?: Being.id - name?: Being.name - ___on_Patron?: Patron - ___on_Pokemon?: Pokemon - ___on_Trainer?: Trainer +export interface Being<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { + id?: Being.id<$Scalars> + name?: Being.name<$Scalars> + ___on_Patron?: Patron<$Scalars> + ___on_Pokemon?: Pokemon<$Scalars> + ___on_Trainer?: Trainer<$Scalars> /** * Inline fragments for field groups. @@ -310,7 +459,9 @@ export interface Being extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Being$FragmentInline | Being$FragmentInline[] + ___?: + | Being$FragmentInline<$Scalars> + | Being$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a interface type and thus polymorphic, @@ -323,26 +474,50 @@ export interface Being extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Being$FragmentInline extends Being, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Being$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Being<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} export namespace Being { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type name = $Select.Indicator.NoArgsIndicator + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > } // @@ -375,23 +550,27 @@ export namespace Being { // ----------------------------------------| Entrypoint Interface | -export interface BattleRoyale extends $Select.Bases.ObjectLike { +export interface BattleRoyale<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `combatants` field on the `BattleRoyale` object. Its type is Object. */ - combatants?: BattleRoyale.combatants$Expanded | $Select.SelectAlias.SelectAlias + combatants?: + | BattleRoyale.combatants$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `date` field on the `BattleRoyale` object. Its type is `Float` (a `Scalar`). */ - date?: BattleRoyale.date$Expanded | $Select.SelectAlias.SelectAlias + date?: BattleRoyale.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `BattleRoyale` object. Its type is `ID` (a `Scalar`). */ - id?: BattleRoyale.id$Expanded | $Select.SelectAlias.SelectAlias + id?: BattleRoyale.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `winner` field on the `BattleRoyale` object. Its type is Object. */ - winner?: BattleRoyale.winner$Expanded | $Select.SelectAlias.SelectAlias + winner?: BattleRoyale.winner$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -401,7 +580,9 @@ export interface BattleRoyale extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: BattleRoyale$FragmentInline | BattleRoyale$FragmentInline[] + ___?: + | BattleRoyale$FragmentInline<$Scalars> + | BattleRoyale$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -413,33 +594,94 @@ export interface BattleRoyale extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface BattleRoyale$FragmentInline extends BattleRoyale, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface BattleRoyale$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends BattleRoyale<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace BattleRoyale { - export interface combatants extends _RefDefs._CombatantMultiPokemon {} - export type combatants$Expanded = combatants + export type combatants<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = combatants$SelectionSet< + $Scalars + > + + export interface combatants$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$CombatantMultiPokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `combatants` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type combatants$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + combatants$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> - export type date = $Select.Indicator.NoArgsIndicator + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type winner<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = winner$SelectionSet<$Scalars> + + export interface winner$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} - export type id = $Select.Indicator.NoArgsIndicator + // --- expanded --- - export interface winner extends _RefDefs._Trainer {} - export type winner$Expanded = winner + /** + * This is the "expanded" version of the `winner` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type winner$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + winner$SelectionSet<$Scalars> + > } // @@ -456,27 +698,33 @@ export namespace BattleRoyale { // ----------------------------------------| Entrypoint Interface | -export interface BattleTrainer extends $Select.Bases.ObjectLike { +export interface BattleTrainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `combatant1` field on the `BattleTrainer` object. Its type is Object. */ - combatant1?: BattleTrainer.combatant1$Expanded | $Select.SelectAlias.SelectAlias + combatant1?: + | BattleTrainer.combatant1$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `combatant2` field on the `BattleTrainer` object. Its type is Object. */ - combatant2?: BattleTrainer.combatant2$Expanded | $Select.SelectAlias.SelectAlias + combatant2?: + | BattleTrainer.combatant2$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `date` field on the `BattleTrainer` object. Its type is `Float` (a `Scalar`). */ - date?: BattleTrainer.date$Expanded | $Select.SelectAlias.SelectAlias + date?: BattleTrainer.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `BattleTrainer` object. Its type is `ID` (a `Scalar`). */ - id?: BattleTrainer.id$Expanded | $Select.SelectAlias.SelectAlias + id?: BattleTrainer.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `winner` field on the `BattleTrainer` object. Its type is Object. */ - winner?: BattleTrainer.winner$Expanded | $Select.SelectAlias.SelectAlias + winner?: BattleTrainer.winner$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -486,7 +734,9 @@ export interface BattleTrainer extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: BattleTrainer$FragmentInline | BattleTrainer$FragmentInline[] + ___?: + | BattleTrainer$FragmentInline<$Scalars> + | BattleTrainer$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -498,35 +748,115 @@ export interface BattleTrainer extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface BattleTrainer$FragmentInline extends BattleTrainer, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface BattleTrainer$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends BattleTrainer<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace BattleTrainer { - export interface combatant1 extends _RefDefs._CombatantSinglePokemon {} - export type combatant1$Expanded = combatant1 - export interface combatant2 extends _RefDefs._CombatantSinglePokemon {} - export type combatant2$Expanded = combatant2 + export type combatant1<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = combatant1$SelectionSet< + $Scalars + > + + export interface combatant1$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$CombatantSinglePokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `combatant1` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type combatant1$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + combatant1$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type combatant2<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = combatant2$SelectionSet< + $Scalars + > + + export interface combatant2$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$CombatantSinglePokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `combatant2` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type combatant2$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + combatant2$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > - export type date = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type winner<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = winner$SelectionSet<$Scalars> - export interface winner extends _RefDefs._Trainer {} - export type winner$Expanded = winner + export interface winner$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `winner` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type winner$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + winner$SelectionSet<$Scalars> + > } // @@ -543,31 +873,35 @@ export namespace BattleTrainer { // ----------------------------------------| Entrypoint Interface | -export interface BattleWild extends $Select.Bases.ObjectLike { +export interface BattleWild<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `date` field on the `BattleWild` object. Its type is `Float` (a `Scalar`). */ - date?: BattleWild.date$Expanded | $Select.SelectAlias.SelectAlias + date?: BattleWild.date$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `BattleWild` object. Its type is `ID` (a `Scalar`). */ - id?: BattleWild.id$Expanded | $Select.SelectAlias.SelectAlias + id?: BattleWild.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemon` field on the `BattleWild` object. Its type is Object. */ - pokemon?: BattleWild.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: BattleWild.pokemon$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `result` field on the `BattleWild` object. Its type is Enum. */ - result?: BattleWild.result$Expanded | $Select.SelectAlias.SelectAlias + result?: BattleWild.result$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `BattleWild` object. Its type is Object. */ - trainer?: BattleWild.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: BattleWild.trainer$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `wildPokemons` field on the `BattleWild` object. Its type is Object. */ - wildPokemons?: BattleWild.wildPokemons$Expanded | $Select.SelectAlias.SelectAlias + wildPokemons?: + | BattleWild.wildPokemons$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -577,7 +911,9 @@ export interface BattleWild extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: BattleWild$FragmentInline | BattleWild$FragmentInline[] + ___?: + | BattleWild$FragmentInline<$Scalars> + | BattleWild$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -589,44 +925,136 @@ export interface BattleWild extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface BattleWild$FragmentInline extends BattleWild, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface BattleWild$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends BattleWild<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace BattleWild { + export type date<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + + export interface date$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `date` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type date$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type date$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | date$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type date = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > - export type id = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type result<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | result$SelectionSet<$Scalars> + + export interface result$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon /** * This is the "expanded" version of the `result` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type result$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type result$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | result$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> - export type result = $Select.Indicator.NoArgsIndicator + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer - export interface wildPokemons extends _RefDefs._Pokemon {} - export type wildPokemons$Expanded = wildPokemons + // --- expanded --- + + /** + * This is the "expanded" version of the `trainer` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type wildPokemons<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = wildPokemons$SelectionSet< + $Scalars + > + + export interface wildPokemons$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `wildPokemons` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type wildPokemons$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + $$Utilities.Simplify< + wildPokemons$SelectionSet<$Scalars> + > } // @@ -643,15 +1071,21 @@ export namespace BattleWild { // ----------------------------------------| Entrypoint Interface | -export interface CombatantMultiPokemon extends $Select.Bases.ObjectLike { +export interface CombatantMultiPokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `pokemons` field on the `CombatantMultiPokemon` object. Its type is Object. */ - pokemons?: CombatantMultiPokemon.pokemons$Expanded | $Select.SelectAlias.SelectAlias + pokemons?: + | CombatantMultiPokemon.pokemons$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `CombatantMultiPokemon` object. Its type is Object. */ - trainer?: CombatantMultiPokemon.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: + | CombatantMultiPokemon.trainer$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -661,7 +1095,9 @@ export interface CombatantMultiPokemon extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: CombatantMultiPokemon$FragmentInline | CombatantMultiPokemon$FragmentInline[] + ___?: + | CombatantMultiPokemon$FragmentInline<$Scalars> + | CombatantMultiPokemon$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -673,17 +1109,48 @@ export interface CombatantMultiPokemon extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface CombatantMultiPokemon$FragmentInline - extends CombatantMultiPokemon, $Select.Directive.$Groups.InlineFragment.Fields +export interface CombatantMultiPokemon$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends CombatantMultiPokemon<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace CombatantMultiPokemon { - export interface pokemons extends _RefDefs._Pokemon {} - export type pokemons$Expanded = pokemons - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer + export type pokemons<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemons$SelectionSet<$Scalars> + + export interface pokemons$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemons` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemons$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemons$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> + + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainer` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > } // @@ -700,15 +1167,21 @@ export namespace CombatantMultiPokemon { // ----------------------------------------| Entrypoint Interface | -export interface CombatantSinglePokemon extends $Select.Bases.ObjectLike { +export interface CombatantSinglePokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `pokemon` field on the `CombatantSinglePokemon` object. Its type is Object. */ - pokemon?: CombatantSinglePokemon.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: + | CombatantSinglePokemon.pokemon$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `CombatantSinglePokemon` object. Its type is Object. */ - trainer?: CombatantSinglePokemon.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: + | CombatantSinglePokemon.trainer$Expanded<$Scalars> + | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -718,7 +1191,9 @@ export interface CombatantSinglePokemon extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: CombatantSinglePokemon$FragmentInline | CombatantSinglePokemon$FragmentInline[] + ___?: + | CombatantSinglePokemon$FragmentInline<$Scalars> + | CombatantSinglePokemon$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -730,17 +1205,48 @@ export interface CombatantSinglePokemon extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface CombatantSinglePokemon$FragmentInline - extends CombatantSinglePokemon, $Select.Directive.$Groups.InlineFragment.Fields +export interface CombatantSinglePokemon$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends CombatantSinglePokemon<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields {} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace CombatantSinglePokemon { - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> + + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `trainer` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > } // @@ -757,19 +1263,19 @@ export namespace CombatantSinglePokemon { // ----------------------------------------| Entrypoint Interface | -export interface Patron extends $Select.Bases.ObjectLike { +export interface Patron<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> extends $Select.Bases.ObjectLike { /** * Select the `id` field on the `Patron` object. Its type is `ID` (a `Scalar`). */ - id?: Patron.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Patron.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `money` field on the `Patron` object. Its type is `Int` (a `Scalar`). */ - money?: Patron.money$Expanded | $Select.SelectAlias.SelectAlias + money?: Patron.money$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Patron` object. Its type is `String` (a `Scalar`). */ - name?: Patron.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Patron.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -779,7 +1285,9 @@ export interface Patron extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Patron$FragmentInline | Patron$FragmentInline[] + ___?: + | Patron$FragmentInline<$Scalars> + | Patron$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -791,37 +1299,76 @@ export interface Patron extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Patron$FragmentInline extends Patron, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Patron$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Patron<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Patron { + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type money<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | money$SelectionSet<$Scalars> - export type id = $Select.Indicator.NoArgsIndicator + export interface money$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `money` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type money$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type money$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | money$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type money = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded - - export type name = $Select.Indicator.NoArgsIndicator + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > } // @@ -838,39 +1385,41 @@ export namespace Patron { // ----------------------------------------| Entrypoint Interface | -export interface Pokemon extends $Select.Bases.ObjectLike { +export interface Pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `attack` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - attack?: Pokemon.attack$Expanded | $Select.SelectAlias.SelectAlias + attack?: Pokemon.attack$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `birthday` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - birthday?: Pokemon.birthday$Expanded | $Select.SelectAlias.SelectAlias + birthday?: Pokemon.birthday$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `defense` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - defense?: Pokemon.defense$Expanded | $Select.SelectAlias.SelectAlias + defense?: Pokemon.defense$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `hp` field on the `Pokemon` object. Its type is `Int` (a `Scalar`). */ - hp?: Pokemon.hp$Expanded | $Select.SelectAlias.SelectAlias + hp?: Pokemon.hp$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Pokemon` object. Its type is `ID` (a `Scalar`). */ - id?: Pokemon.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Pokemon.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Pokemon` object. Its type is `String` (a `Scalar`). */ - name?: Pokemon.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Pokemon.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `trainer` field on the `Pokemon` object. Its type is Object. */ - trainer?: Pokemon.trainer$Expanded | $Select.SelectAlias.SelectAlias + trainer?: Pokemon.trainer$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `type` field on the `Pokemon` object. Its type is Enum. */ - type?: Pokemon.type$Expanded | $Select.SelectAlias.SelectAlias + type?: Pokemon.type$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -880,7 +1429,9 @@ export interface Pokemon extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Pokemon$FragmentInline | Pokemon$FragmentInline[] + ___?: + | Pokemon$FragmentInline<$Scalars> + | Pokemon$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -892,75 +1443,183 @@ export interface Pokemon extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Pokemon$FragmentInline extends Pokemon, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Pokemon$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Pokemon<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Pokemon { + export type attack<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | attack$SelectionSet<$Scalars> + + export interface attack$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `attack` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type attack$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type attack$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | attack$SelectionSet<$Scalars> + > - export type attack = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type birthday<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | birthday$SelectionSet<$Scalars> + + export interface birthday$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `birthday` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type birthday$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type birthday$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | birthday$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type birthday = $Select.Indicator.NoArgsIndicator + export type defense<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | defense$SelectionSet<$Scalars> + + export interface defense$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `defense` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type defense$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type defense$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | defense$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type hp<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | hp$SelectionSet<$Scalars> + + export interface hp$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type defense = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `hp` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type hp$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type hp$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | hp$SelectionSet<$Scalars> + > - export type hp = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- - export type id = $Select.Indicator.NoArgsIndicator + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = trainer$SelectionSet<$Scalars> - export type name = $Select.Indicator.NoArgsIndicator + export interface trainer$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Trainer<$Scalars> + {} + + // --- expanded --- - export interface trainer extends _RefDefs._Trainer {} - export type trainer$Expanded = trainer /** - * This is the "expanded" version of the `type` type. It is identical except for the fact + * This is the "expanded" version of the `trainer` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type type$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type trainer$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + trainer$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type type<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | type$SelectionSet<$Scalars> - export type type = $Select.Indicator.NoArgsIndicator + export interface type$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `type` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type type$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | type$SelectionSet<$Scalars> + > } // @@ -977,27 +1636,29 @@ export namespace Pokemon { // ----------------------------------------| Entrypoint Interface | -export interface Trainer extends $Select.Bases.ObjectLike { +export interface Trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.ObjectLike +{ /** * Select the `class` field on the `Trainer` object. Its type is Enum. */ - class?: Trainer.$class$Expanded | $Select.SelectAlias.SelectAlias + class?: Trainer.$class$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `fans` field on the `Trainer` object. Its type is Object. */ - fans?: Trainer.fans$Expanded | $Select.SelectAlias.SelectAlias + fans?: Trainer.fans$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `id` field on the `Trainer` object. Its type is `ID` (a `Scalar`). */ - id?: Trainer.id$Expanded | $Select.SelectAlias.SelectAlias + id?: Trainer.id$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `name` field on the `Trainer` object. Its type is `String` (a `Scalar`). */ - name?: Trainer.name$Expanded | $Select.SelectAlias.SelectAlias + name?: Trainer.name$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Select the `pokemon` field on the `Trainer` object. Its type is Object. */ - pokemon?: Trainer.pokemon$Expanded | $Select.SelectAlias.SelectAlias + pokemon?: Trainer.pokemon$Expanded<$Scalars> | $Select.SelectAlias.SelectAlias> /** * Inline fragments for field groups. @@ -1007,7 +1668,9 @@ export interface Trainer extends $Select.Bases.ObjectLike { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Trainer$FragmentInline | Trainer$FragmentInline[] + ___?: + | Trainer$FragmentInline<$Scalars> + | Trainer$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. @@ -1019,42 +1682,114 @@ export interface Trainer extends $Select.Bases.ObjectLike { | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Trainer$FragmentInline extends Trainer, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Trainer$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Trainer<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} -// ----------------------------------------| Fields Interfaces | +// ----------------------------------------| Fields | export namespace Trainer { + export type $class<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | $class$SelectionSet<$Scalars> + + export interface $class$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- + /** * This is the "expanded" version of the `$class` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type $class$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type $class$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | $class$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type fans<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = fans$SelectionSet<$Scalars> + + export interface fans$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Patron<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `fans` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type fans$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + fans$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type id<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> - export type $class = $Select.Indicator.NoArgsIndicator + export interface id$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} + + // --- expanded --- - export interface fans extends _RefDefs._Patron {} - export type fans$Expanded = fans /** * This is the "expanded" version of the `id` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type id$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type id$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | id$SelectionSet<$Scalars> + > + + // -------------------------------------------------------------------------------------------------- + + export type name<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + + export interface name$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base + {} - export type id = $Select.Indicator.NoArgsIndicator + // --- expanded --- /** * This is the "expanded" version of the `name` type. It is identical except for the fact * that IDEs will display its contents (a union type) directly, rather than the name of this type. * In some cases, this is a preferable DX, making the types easier to read for users. */ - export type name$Expanded = $Select.Indicator.NoArgsIndicator$Expanded + export type name$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + | $Select.Indicator.NoArgsIndicator + | name$SelectionSet<$Scalars> + > - export type name = $Select.Indicator.NoArgsIndicator + // -------------------------------------------------------------------------------------------------- - export interface pokemon extends _RefDefs._Pokemon {} - export type pokemon$Expanded = pokemon + export type pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = pokemon$SelectionSet<$Scalars> + + export interface pokemon$SelectionSet<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends $Select.Bases.Base, $NamedTypes.$Pokemon<$Scalars> + {} + + // --- expanded --- + + /** + * This is the "expanded" version of the `pokemon` type. It is identical except for the fact + * that IDEs will display its contents (a union type) directly, rather than the name of this type. + * In some cases, this is a preferable DX, making the types easier to read for users. + */ + export type pokemon$Expanded<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = $$Utilities.Simplify< + pokemon$SelectionSet<$Scalars> + > } // @@ -1073,10 +1808,10 @@ export namespace Trainer { // // -export interface Battle { - ___on_BattleRoyale?: BattleRoyale - ___on_BattleTrainer?: BattleTrainer - ___on_BattleWild?: BattleWild +export interface Battle<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> { + ___on_BattleRoyale?: BattleRoyale<$Scalars> + ___on_BattleTrainer?: BattleTrainer<$Scalars> + ___on_BattleWild?: BattleWild<$Scalars> /** * Inline fragments for field groups. @@ -1086,7 +1821,9 @@ export interface Battle { * * @see https://spec.graphql.org/draft/#sec-Inline-Fragments */ - ___?: Battle$FragmentInline | Battle$FragmentInline[] + ___?: + | Battle$FragmentInline<$Scalars> + | Battle$FragmentInline<$Scalars>[] /** * A meta field. Is the name of the type being selected. Since this is a union type and thus polymorphic, @@ -1098,7 +1835,9 @@ export interface Battle { | $Select.Indicator.NoArgsIndicator$Expanded | $Select.SelectAlias.SelectAlias<$Select.Indicator.NoArgsIndicator> } -export interface Battle$FragmentInline extends Battle, $Select.Directive.$Groups.InlineFragment.Fields {} +export interface Battle$FragmentInline<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> + extends Battle<$Scalars>, $Select.Directive.$Groups.InlineFragment.Fields +{} /** * [1] These definitions serve to allow field selection interfaces to extend their respective object type without @@ -1107,23 +1846,25 @@ export interface Battle$FragmentInline extends Battle, $Select.Directive.$Groups * For example imagine `Query.Foo` field with type also called `Foo`. Our generated interfaces for each field * would end up with an error of `export interface Foo extends Foo ...` */ -export namespace _RefDefs { - export type _Mutation = Mutation - export type _Query = Query - export type _BattleWildResult = BattleWildResult - export type _PokemonType = PokemonType - export type _TrainerClass = TrainerClass - export type _DateFilter = DateFilter - export type _PokemonFilter = PokemonFilter - export type _StringFilter = StringFilter - export type _Being = Being - export type _BattleRoyale = BattleRoyale - export type _BattleTrainer = BattleTrainer - export type _BattleWild = BattleWild - export type _CombatantMultiPokemon = CombatantMultiPokemon - export type _CombatantSinglePokemon = CombatantSinglePokemon - export type _Patron = Patron - export type _Pokemon = Pokemon - export type _Trainer = Trainer - export type _Battle = Battle +export namespace $NamedTypes { + export type $Mutation<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Mutation<$Scalars> + export type $Query<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Query<$Scalars> + export type $BattleWildResult = BattleWildResult + export type $PokemonType = PokemonType + export type $TrainerClass = TrainerClass + export type $DateFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = DateFilter<$Scalars> + export type $PokemonFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = PokemonFilter<$Scalars> + export type $StringFilter<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = StringFilter<$Scalars> + export type $Being<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Being<$Scalars> + export type $BattleRoyale<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = BattleRoyale<$Scalars> + export type $BattleTrainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = BattleTrainer<$Scalars> + export type $BattleWild<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = BattleWild<$Scalars> + export type $CombatantMultiPokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + CombatantMultiPokemon<$Scalars> + export type $CombatantSinglePokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = + CombatantSinglePokemon<$Scalars> + export type $Patron<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Patron<$Scalars> + export type $Pokemon<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Pokemon<$Scalars> + export type $Trainer<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Trainer<$Scalars> + export type $Battle<$Scalars extends $$Utilities.SchemaKit.Scalar.ScalarMap = {}> = Battle<$Scalars> }