From afc9255598be07ef2288bace274130ca14c2cda5 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Fri, 18 Oct 2024 22:06:17 -0400 Subject: [PATCH 1/3] refactor(generator): no kind namespace --- .../tests/fixture/graffle/modules/Schema.ts | 726 +++++++++--------- src/layers/4_generator/generators/Schema.ts | 54 +- .../kitchen-sink/graffle/modules/Schema.ts | 726 +++++++++--------- .../mutation-only/graffle/modules/Schema.ts | 36 +- .../schemas/pokemon/graffle/modules/Schema.ts | 327 ++++---- .../query-only/graffle/modules/Schema.ts | 36 +- website/graffle/modules/Schema.ts | 258 +++---- website/pokemon/modules/Schema.ts | 327 ++++---- 8 files changed, 1195 insertions(+), 1295 deletions(-) diff --git a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts index 3244984fb..1df96bf2d 100644 --- a/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts +++ b/src/extensions/SchemaErrors/tests/fixture/graffle/modules/Schema.ts @@ -18,215 +18,213 @@ export namespace Schema { // // - export namespace Root { - export type Mutation = $.Output.ObjectMutation<{ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - }> - - export type Query = $.Output.ObjectQuery<{ - InputObjectNested: $.Field< - 'InputObjectNested', - $.Output.Nullable<$Scalar.ID>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - InputObjectNestedNonNull: $.Field< - 'InputObjectNestedNonNull', - $.Output.Nullable<$Scalar.ID>, - $.Args<{ - input: $.Input.Field - }, false> - > - /** - * Query enum field documentation. - */ - abcEnum: $.Field<'abcEnum', $.Output.Nullable, null> - argInputObjectCircular: $.Field< - 'argInputObjectCircular', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - date: $.Field<'date', $.Output.Nullable<$Scalar.Date>, null> - dateArg: $.Field< - 'dateArg', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - }, true> - > - dateArgInputObject: $.Field< - 'dateArgInputObject', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - dateArgList: $.Field< - 'dateArgList', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.Date>>> - }, true> - > - dateArgNonNull: $.Field< - 'dateArgNonNull', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$Scalar.Date> - }, false> - > - dateArgNonNullList: $.Field< - 'dateArgNonNullList', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.List<$.Input.Nullable<$Scalar.Date>>> - }, false> - > - dateArgNonNullListNonNull: $.Field< - 'dateArgNonNullListNonNull', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.List<$Scalar.Date>> - }, false> - > - dateInterface1: $.Field<'dateInterface1', $.Output.Nullable, null> - dateList: $.Field<'dateList', $.Output.Nullable<$.Output.List<$Scalar.Date>>, null> - dateListList: $.Field<'dateListList', $.Output.Nullable<$.Output.List<$.Output.List<$Scalar.Date>>>, null> - dateListNonNull: $.Field<'dateListNonNull', $.Output.List<$Scalar.Date>, null> - dateNonNull: $.Field<'dateNonNull', $Scalar.Date, null> - dateObject1: $.Field<'dateObject1', $.Output.Nullable, null> - dateUnion: $.Field<'dateUnion', $.Output.Nullable, null> - error: $.Field< - 'error', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - case: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - interface: $.Field<'interface', $.Output.Nullable, null> - interfaceNonNull: $.Field<'interfaceNonNull', Interface.Interface, null> - interfaceWithArgs: $.Field< - 'interfaceWithArgs', - $.Output.Nullable, - $.Args<{ - id: $.Input.Field<$Scalar.ID> - }, false> - > - listInt: $.Field<'listInt', $.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>, null> - listIntNonNull: $.Field<'listIntNonNull', $.Output.List<$Scalar.Int>, null> - listListInt: $.Field< - 'listListInt', - $.Output.Nullable<$.Output.List<$.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>>>, - null - > - listListIntNonNull: $.Field<'listListIntNonNull', $.Output.List<$.Output.List<$Scalar.Int>>, null> - lowerCaseUnion: $.Field<'lowerCaseUnion', $.Output.Nullable, null> - object: $.Field<'object', $.Output.Nullable, null> - objectList: $.Field<'objectList', $.Output.Nullable<$.Output.List>, null> - objectListNonNull: $.Field<'objectListNonNull', $.Output.List, null> - objectNested: $.Field<'objectNested', $.Output.Nullable, null> - objectNonNull: $.Field<'objectNonNull', Object.Object1, null> - objectWithArgs: $.Field< - 'objectWithArgs', - $.Output.Nullable, - $.Args<{ - boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> - float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - string: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - result: $.Field< - 'result', - $.Output.Nullable, - $.Args<{ - case: $.Input.Field - }, false> - > - resultNonNull: $.Field< - 'resultNonNull', - Union.Result, - $.Args<{ - case: $.Input.Field<$.Input.Nullable> - }, true> - > - string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> - stringWithArgEnum: $.Field< - 'stringWithArgEnum', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ABCEnum: $.Input.Field<$.Input.Nullable> - }, true> - > - stringWithArgInputObject: $.Field< - 'stringWithArgInputObject', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - stringWithArgInputObjectRequired: $.Field< - 'stringWithArgInputObjectRequired', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field - }, false> - > - /** - * The given arguments are reflected back as a JSON string. - */ - stringWithArgs: $.Field< - 'stringWithArgs', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> - float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - string: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - stringWithListArg: $.Field< - 'stringWithListArg', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ints: $.Input.Field<$.Input.Nullable<$.Input.List<$.Input.Nullable<$Scalar.Int>>>> - }, true> - > - stringWithListArgRequired: $.Field< - 'stringWithListArgRequired', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ints: $.Input.Field<$.Input.List<$Scalar.Int>> - }, false> - > - stringWithRequiredArg: $.Field< - 'stringWithRequiredArg', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - string: $.Input.Field<$Scalar.String> - }, false> - > - unionFooBar: $.Field<'unionFooBar', $.Output.Nullable, null> - unionFooBarNonNull: $.Field<'unionFooBarNonNull', Union.FooBarUnion, null> - unionFooBarWithArgs: $.Field< - 'unionFooBarWithArgs', - $.Output.Nullable, - $.Args<{ - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - }, true> - > - unionObject: $.Field<'unionObject', $.Output.Nullable, null> - unionObjectNonNull: $.Field<'unionObjectNonNull', Object.ObjectUnion, null> - }> - } + export type Mutation = $.Output.ObjectMutation<{ + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + }> + + export type Query = $.Output.ObjectQuery<{ + InputObjectNested: $.Field< + 'InputObjectNested', + $.Output.Nullable<$Scalar.ID>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + InputObjectNestedNonNull: $.Field< + 'InputObjectNestedNonNull', + $.Output.Nullable<$Scalar.ID>, + $.Args<{ + input: $.Input.Field + }, false> + > + /** + * Query enum field documentation. + */ + abcEnum: $.Field<'abcEnum', $.Output.Nullable, null> + argInputObjectCircular: $.Field< + 'argInputObjectCircular', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + date: $.Field<'date', $.Output.Nullable<$Scalar.Date>, null> + dateArg: $.Field< + 'dateArg', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + }, true> + > + dateArgInputObject: $.Field< + 'dateArgInputObject', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + dateArgList: $.Field< + 'dateArgList', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.Date>>> + }, true> + > + dateArgNonNull: $.Field< + 'dateArgNonNull', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$Scalar.Date> + }, false> + > + dateArgNonNullList: $.Field< + 'dateArgNonNullList', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.List<$.Input.Nullable<$Scalar.Date>>> + }, false> + > + dateArgNonNullListNonNull: $.Field< + 'dateArgNonNullListNonNull', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.List<$Scalar.Date>> + }, false> + > + dateInterface1: $.Field<'dateInterface1', $.Output.Nullable, null> + dateList: $.Field<'dateList', $.Output.Nullable<$.Output.List<$Scalar.Date>>, null> + dateListList: $.Field<'dateListList', $.Output.Nullable<$.Output.List<$.Output.List<$Scalar.Date>>>, null> + dateListNonNull: $.Field<'dateListNonNull', $.Output.List<$Scalar.Date>, null> + dateNonNull: $.Field<'dateNonNull', $Scalar.Date, null> + dateObject1: $.Field<'dateObject1', $.Output.Nullable, null> + dateUnion: $.Field<'dateUnion', $.Output.Nullable, null> + error: $.Field< + 'error', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + case: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + interface: $.Field<'interface', $.Output.Nullable, null> + interfaceNonNull: $.Field<'interfaceNonNull', Interface, null> + interfaceWithArgs: $.Field< + 'interfaceWithArgs', + $.Output.Nullable, + $.Args<{ + id: $.Input.Field<$Scalar.ID> + }, false> + > + listInt: $.Field<'listInt', $.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>, null> + listIntNonNull: $.Field<'listIntNonNull', $.Output.List<$Scalar.Int>, null> + listListInt: $.Field< + 'listListInt', + $.Output.Nullable<$.Output.List<$.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>>>, + null + > + listListIntNonNull: $.Field<'listListIntNonNull', $.Output.List<$.Output.List<$Scalar.Int>>, null> + lowerCaseUnion: $.Field<'lowerCaseUnion', $.Output.Nullable, null> + object: $.Field<'object', $.Output.Nullable, null> + objectList: $.Field<'objectList', $.Output.Nullable<$.Output.List>, null> + objectListNonNull: $.Field<'objectListNonNull', $.Output.List, null> + objectNested: $.Field<'objectNested', $.Output.Nullable, null> + objectNonNull: $.Field<'objectNonNull', Object1, null> + objectWithArgs: $.Field< + 'objectWithArgs', + $.Output.Nullable, + $.Args<{ + boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> + float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + string: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + result: $.Field< + 'result', + $.Output.Nullable, + $.Args<{ + case: $.Input.Field + }, false> + > + resultNonNull: $.Field< + 'resultNonNull', + Result, + $.Args<{ + case: $.Input.Field<$.Input.Nullable> + }, true> + > + string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> + stringWithArgEnum: $.Field< + 'stringWithArgEnum', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ABCEnum: $.Input.Field<$.Input.Nullable> + }, true> + > + stringWithArgInputObject: $.Field< + 'stringWithArgInputObject', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + stringWithArgInputObjectRequired: $.Field< + 'stringWithArgInputObjectRequired', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field + }, false> + > + /** + * The given arguments are reflected back as a JSON string. + */ + stringWithArgs: $.Field< + 'stringWithArgs', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> + float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + string: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + stringWithListArg: $.Field< + 'stringWithListArg', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ints: $.Input.Field<$.Input.Nullable<$.Input.List<$.Input.Nullable<$Scalar.Int>>>> + }, true> + > + stringWithListArgRequired: $.Field< + 'stringWithListArgRequired', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ints: $.Input.Field<$.Input.List<$Scalar.Int>> + }, false> + > + stringWithRequiredArg: $.Field< + 'stringWithRequiredArg', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + string: $.Input.Field<$Scalar.String> + }, false> + > + unionFooBar: $.Field<'unionFooBar', $.Output.Nullable, null> + unionFooBarNonNull: $.Field<'unionFooBarNonNull', FooBarUnion, null> + unionFooBarWithArgs: $.Field< + 'unionFooBarWithArgs', + $.Output.Nullable, + $.Args<{ + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + }, true> + > + unionObject: $.Field<'unionObject', $.Output.Nullable, null> + unionObjectNonNull: $.Field<'unionObjectNonNull', ObjectUnion, null> + }> // // @@ -244,19 +242,17 @@ export namespace Schema { // // - export namespace Enum { - /** - * Enum documentation. - * - * Members - * "A" - (DEPRECATED: Enum value A is deprecated.) - * "B" - Enum B member documentation. - * "C" - (DEPRECATED: Enum value C is deprecated.) - */ - export type ABCEnum = $.Enum<'ABCEnum', ['A', 'B', 'C']> + /** + * Enum documentation. + * + * Members + * "A" - (DEPRECATED: Enum value A is deprecated.) + * "B" - Enum B member documentation. + * "C" - (DEPRECATED: Enum value C is deprecated.) + */ + export type ABCEnum = $.Enum<'ABCEnum', ['A', 'B', 'C']> - export type Case = $.Enum<'Case', ['ErrorOne', 'ErrorTwo', 'Object1']> - } + export type Case = $.Enum<'Case', ['ErrorOne', 'ErrorTwo', 'Object1']> // // @@ -274,27 +270,25 @@ export namespace Schema { // // - export namespace InputObject { - export type InputObject = $.InputObject<'InputObject', { - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - dateRequired: $.Input.Field<$Scalar.Date> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - idRequired: $.Input.Field<$Scalar.ID> - }, true> + export type InputObject = $.InputObject<'InputObject', { + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + dateRequired: $.Input.Field<$Scalar.Date> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + idRequired: $.Input.Field<$Scalar.ID> + }, true> - export type InputObjectCircular = $.InputObject<'InputObjectCircular', { - circular: $.Input.Field<$.Input.Nullable> - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - }, true> + export type InputObjectCircular = $.InputObject<'InputObjectCircular', { + circular: $.Input.Field<$.Input.Nullable> + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + }, true> - export type InputObjectNested = $.InputObject<'InputObjectNested', { - InputObject: $.Input.Field<$.Input.Nullable> - }, true> + export type InputObjectNested = $.InputObject<'InputObjectNested', { + InputObject: $.Input.Field<$.Input.Nullable> + }, true> - export type InputObjectNestedNonNull = $.InputObject<'InputObjectNestedNonNull', { - InputObject: $.Input.Field - }, false> - } + export type InputObjectNestedNonNull = $.InputObject<'InputObjectNestedNonNull', { + InputObject: $.Input.Field + }, false> // // @@ -312,19 +306,17 @@ export namespace Schema { // // - export namespace Interface { - export type DateInterface1 = $.Interface<'DateInterface1', { - date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> - }, [Object.DateObject1]> + export type DateInterface1 = $.Interface<'DateInterface1', { + date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> + }, [DateObject1]> - export type Error = $.Interface<'Error', { - message: $.Field<'message', $Scalar.String, null> - }, [Object.ErrorOne, Object.ErrorTwo]> + export type Error = $.Interface<'Error', { + message: $.Field<'message', $Scalar.String, null> + }, [ErrorOne, ErrorTwo]> - export type Interface = $.Interface<'Interface', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }, [Object.Object1ImplementingInterface, Object.Object2ImplementingInterface]> - } + export type Interface = $.Interface<'Interface', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }, [Object1ImplementingInterface, Object2ImplementingInterface]> // // @@ -342,76 +334,74 @@ export namespace Schema { // // - export namespace Object { - export type Bar = $.Object$2<'Bar', { - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> + export type Bar = $.Object$2<'Bar', { + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> - export type DateObject1 = $.Object$2<'DateObject1', { - date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> - }> + export type DateObject1 = $.Object$2<'DateObject1', { + date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> + }> - export type DateObject2 = $.Object$2<'DateObject2', { - date2: $.Field<'date2', $.Output.Nullable<$Scalar.Date>, null> - }> + export type DateObject2 = $.Object$2<'DateObject2', { + date2: $.Field<'date2', $.Output.Nullable<$Scalar.Date>, null> + }> - export type ErrorOne = $.Object$2<'ErrorOne', { - infoId: $.Field<'infoId', $.Output.Nullable<$Scalar.ID>, null> - message: $.Field<'message', $Scalar.String, null> - }> + export type ErrorOne = $.Object$2<'ErrorOne', { + infoId: $.Field<'infoId', $.Output.Nullable<$Scalar.ID>, null> + message: $.Field<'message', $Scalar.String, null> + }> - export type ErrorTwo = $.Object$2<'ErrorTwo', { - infoInt: $.Field<'infoInt', $.Output.Nullable<$Scalar.Int>, null> - message: $.Field<'message', $Scalar.String, null> - }> + export type ErrorTwo = $.Object$2<'ErrorTwo', { + infoInt: $.Field<'infoInt', $.Output.Nullable<$Scalar.Int>, null> + message: $.Field<'message', $Scalar.String, null> + }> + /** + * Object documentation. + */ + export type Foo = $.Object$2<'Foo', { /** - * Object documentation. + * Field documentation. + * + * @deprecated Field a is deprecated. */ - export type Foo = $.Object$2<'Foo', { - /** - * Field documentation. - * - * @deprecated Field a is deprecated. - */ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type Object1 = $.Object$2<'Object1', { - boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> - float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> - }> - - export type Object1ImplementingInterface = $.Object$2<'Object1ImplementingInterface', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> - - export type Object2ImplementingInterface = $.Object$2<'Object2ImplementingInterface', { - boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type ObjectNested = $.Object$2<'ObjectNested', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - object: $.Field<'object', $.Output.Nullable, null> - }> - - export type ObjectUnion = $.Object$2<'ObjectUnion', { - fooBarUnion: $.Field<'fooBarUnion', $.Output.Nullable, null> - }> - - export type lowerCaseObject = $.Object$2<'lowerCaseObject', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type lowerCaseObject2 = $.Object$2<'lowerCaseObject2', { - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> - } + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type Object1 = $.Object$2<'Object1', { + boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> + float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> + }> + + export type Object1ImplementingInterface = $.Object$2<'Object1ImplementingInterface', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> + + export type Object2ImplementingInterface = $.Object$2<'Object2ImplementingInterface', { + boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type ObjectNested = $.Object$2<'ObjectNested', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + object: $.Field<'object', $.Output.Nullable, null> + }> + + export type ObjectUnion = $.Object$2<'ObjectUnion', { + fooBarUnion: $.Field<'fooBarUnion', $.Output.Nullable, null> + }> + + export type lowerCaseObject = $.Object$2<'lowerCaseObject', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type lowerCaseObject2 = $.Object$2<'lowerCaseObject2', { + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> // // @@ -429,18 +419,16 @@ export namespace Schema { // // - export namespace Union { - export type DateUnion = $.Union<'DateUnion', [Object.DateObject1, Object.DateObject2]> + export type DateUnion = $.Union<'DateUnion', [DateObject1, DateObject2]> - /** - * Union documentation. - */ - export type FooBarUnion = $.Union<'FooBarUnion', [Object.Bar, Object.Foo]> + /** + * Union documentation. + */ + export type FooBarUnion = $.Union<'FooBarUnion', [Bar, Foo]> - export type Result = $.Union<'Result', [Object.ErrorOne, Object.ErrorTwo, Object.Object1]> + export type Result = $.Union<'Result', [ErrorOne, ErrorTwo, Object1]> - export type lowerCaseUnion = $.Union<'lowerCaseUnion', [Object.lowerCaseObject, Object.lowerCaseObject2]> - } + export type lowerCaseUnion = $.Union<'lowerCaseUnion', [lowerCaseObject, lowerCaseObject2]> } // // @@ -465,63 +453,63 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Mutation', 'Query'] - RootUnion: Schema.Root.Mutation | Schema.Root.Query + RootUnion: Schema.Mutation | Schema.Query Root: { - Query: Schema.Root.Query - Mutation: Schema.Root.Mutation + Query: Schema.Query + Mutation: Schema.Mutation Subscription: null } allTypes: { - Mutation: Schema.Root.Mutation - Query: Schema.Root.Query - ABCEnum: Schema.Enum.ABCEnum - Case: Schema.Enum.Case - Bar: Schema.Object.Bar - DateObject1: Schema.Object.DateObject1 - DateObject2: Schema.Object.DateObject2 - ErrorOne: Schema.Object.ErrorOne - ErrorTwo: Schema.Object.ErrorTwo - Foo: Schema.Object.Foo - Object1: Schema.Object.Object1 - Object1ImplementingInterface: Schema.Object.Object1ImplementingInterface - Object2ImplementingInterface: Schema.Object.Object2ImplementingInterface - ObjectNested: Schema.Object.ObjectNested - ObjectUnion: Schema.Object.ObjectUnion - lowerCaseObject: Schema.Object.lowerCaseObject - lowerCaseObject2: Schema.Object.lowerCaseObject2 - DateUnion: Schema.Union.DateUnion - FooBarUnion: Schema.Union.FooBarUnion - Result: Schema.Union.Result - lowerCaseUnion: Schema.Union.lowerCaseUnion - DateInterface1: Schema.Interface.DateInterface1 - Error: Schema.Interface.Error - Interface: Schema.Interface.Interface + Mutation: Schema.Mutation + Query: Schema.Query + ABCEnum: Schema.ABCEnum + Case: Schema.Case + Bar: Schema.Bar + DateObject1: Schema.DateObject1 + DateObject2: Schema.DateObject2 + ErrorOne: Schema.ErrorOne + ErrorTwo: Schema.ErrorTwo + Foo: Schema.Foo + Object1: Schema.Object1 + Object1ImplementingInterface: Schema.Object1ImplementingInterface + Object2ImplementingInterface: Schema.Object2ImplementingInterface + ObjectNested: Schema.ObjectNested + ObjectUnion: Schema.ObjectUnion + lowerCaseObject: Schema.lowerCaseObject + lowerCaseObject2: Schema.lowerCaseObject2 + DateUnion: Schema.DateUnion + FooBarUnion: Schema.FooBarUnion + Result: Schema.Result + lowerCaseUnion: Schema.lowerCaseUnion + DateInterface1: Schema.DateInterface1 + Error: Schema.Error + Interface: Schema.Interface } objects: { - Bar: Schema.Object.Bar - DateObject1: Schema.Object.DateObject1 - DateObject2: Schema.Object.DateObject2 - ErrorOne: Schema.Object.ErrorOne - ErrorTwo: Schema.Object.ErrorTwo - Foo: Schema.Object.Foo - Object1: Schema.Object.Object1 - Object1ImplementingInterface: Schema.Object.Object1ImplementingInterface - Object2ImplementingInterface: Schema.Object.Object2ImplementingInterface - ObjectNested: Schema.Object.ObjectNested - ObjectUnion: Schema.Object.ObjectUnion - lowerCaseObject: Schema.Object.lowerCaseObject - lowerCaseObject2: Schema.Object.lowerCaseObject2 + Bar: Schema.Bar + DateObject1: Schema.DateObject1 + DateObject2: Schema.DateObject2 + ErrorOne: Schema.ErrorOne + ErrorTwo: Schema.ErrorTwo + Foo: Schema.Foo + Object1: Schema.Object1 + Object1ImplementingInterface: Schema.Object1ImplementingInterface + Object2ImplementingInterface: Schema.Object2ImplementingInterface + ObjectNested: Schema.ObjectNested + ObjectUnion: Schema.ObjectUnion + lowerCaseObject: Schema.lowerCaseObject + lowerCaseObject2: Schema.lowerCaseObject2 } unions: { - DateUnion: Schema.Union.DateUnion - FooBarUnion: Schema.Union.FooBarUnion - Result: Schema.Union.Result - lowerCaseUnion: Schema.Union.lowerCaseUnion + DateUnion: Schema.DateUnion + FooBarUnion: Schema.FooBarUnion + Result: Schema.Result + lowerCaseUnion: Schema.lowerCaseUnion } interfaces: { - DateInterface1: Schema.Interface.DateInterface1 - Error: Schema.Interface.Error - Interface: Schema.Interface.Interface + DateInterface1: Schema.DateInterface1 + Error: Schema.Error + Interface: Schema.Interface } customScalars: Utilities.SchemaIndexBase['customScalars'] extensions: { diff --git a/src/layers/4_generator/generators/Schema.ts b/src/layers/4_generator/generators/Schema.ts index 0864da03f..9f7fbd420 100644 --- a/src/layers/4_generator/generators/Schema.ts +++ b/src/layers/4_generator/generators/Schema.ts @@ -54,7 +54,6 @@ export const ModuleGeneratorSchema = createModuleGenerator( code(`\n\n`) code(`export namespace ${identifiers.Schema} {`) - // todo do we need kind namespaces? for (const [name, types] of entries(config.schema.kindMap)) { if (name === `GraphQLScalarType`) continue if (name === `GraphQLScalarTypeCustom`) continue @@ -64,16 +63,13 @@ export const ModuleGeneratorSchema = createModuleGenerator( code() code(title1(namespaceName)) code() - code(Code.export$( - Code.namespace( - namespaceName, - types.length === 0 - ? `// -- no types --\n` - : types - .map((_) => dispatchToConcreteRenderer(config, _)) - .join(`\n\n`), - ), - )) + code( + types.length === 0 + ? `// -- no types --\n` + : types + .map((_) => dispatchToConcreteRenderer(config, _)) + .join(`\n\n`), + ) } code(`}`) @@ -101,32 +97,28 @@ export const SchemaGenerator = createCodeGenerator( Subscription: Grafaid.Schema.KindMap.hasSubscription(config.schema.kindMap), } - const root = config.schema.kindMap.GraphQLRootType.map(_ => - [_.name, `${identifiers.Schema}.Root.${_.name}`] as const - ) + const root = config.schema.kindMap.GraphQLRootType.map(_ => [_.name, `${identifiers.Schema}.${_.name}`] as const) const objects = config.schema.kindMap.GraphQLObjectType.map(_ => - [_.name, `${identifiers.Schema}.Object.${_.name}`] as const - ) - const unions = config.schema.kindMap.GraphQLUnionType.map(_ => - [_.name, `${identifiers.Schema}.Union.${_.name}`] as const + [_.name, `${identifiers.Schema}.${_.name}`] as const ) + const unions = config.schema.kindMap.GraphQLUnionType.map(_ => [_.name, `${identifiers.Schema}.${_.name}`] as const) const interfaces = config.schema.kindMap.GraphQLInterfaceType.map( - _ => [_.name, `${identifiers.Schema}.Interface.${_.name}`] as const, + _ => [_.name, `${identifiers.Schema}.${_.name}`] as const, ) const enums = config.schema.kindMap.GraphQLEnumType.map( - _ => [_.name, `${identifiers.Schema}.Enum.${_.name}`] as const, + _ => [_.name, `${identifiers.Schema}.${_.name}`] as const, ) const schema: Code.TermObject = { name: `Data.Name`, RootTypesPresent: `[${config.schema.kindMap.GraphQLRootType.map((_) => Code.string(_.name)).join(`, `)}]`, - RootUnion: config.schema.kindMap.GraphQLRootType.map(_ => `${identifiers.Schema}.Root.${_.name}`) + RootUnion: config.schema.kindMap.GraphQLRootType.map(_ => `${identifiers.Schema}.${_.name}`) .join(`|`), Root: { - Query: rootTypesPresence.Query ? `${identifiers.Schema}.Root.Query` : null, - Mutation: rootTypesPresence.Mutation ? `${identifiers.Schema}.Root.Mutation` : null, - Subscription: rootTypesPresence.Subscription ? `${identifiers.Schema}.Root.Subscription` : null, + Query: rootTypesPresence.Query ? `${identifiers.Schema}.Query` : null, + Mutation: rootTypesPresence.Mutation ? `${identifiers.Schema}.Mutation` : null, + Subscription: rootTypesPresence.Subscription ? `${identifiers.Schema}.Subscription` : null, }, allTypes: Code.objectFromEntries([ ...root, @@ -229,13 +221,11 @@ const dispatchToReferenceRenderer = (config: Config, type: Grafaid.Schema.Types) } const referenceRenderers = defineReferenceRenderers({ - GraphQLEnumType: (_, node) => Code.propertyAccess(namespaceNames.GraphQLEnumType, node.name), - GraphQLInputObjectType: (_, node) => Code.propertyAccess(namespaceNames.GraphQLInputObjectType, node.name), - GraphQLInterfaceType: (_, node) => Code.propertyAccess(namespaceNames.GraphQLInterfaceType, node.name), - GraphQLObjectType: (_, node) => { - return Code.propertyAccess(namespaceNames.GraphQLObjectType, node.name) - }, - GraphQLUnionType: (_, node) => Code.propertyAccess(namespaceNames.GraphQLUnionType, node.name), + GraphQLEnumType: (_, node) => node.name, + GraphQLInputObjectType: (_, node) => node.name, + GraphQLInterfaceType: (_, node) => node.name, + GraphQLObjectType: (_, node) => node.name, + GraphQLUnionType: (_, node) => node.name, GraphQLScalarType: (_, node) => `$Scalar.${node.name}`, }) @@ -282,7 +272,7 @@ const concreteRenderers = defineConcreteRenderers({ Code.export$(Code.type( node.name, `$.Interface<${Code.string(node.name)}, ${renderOutputFields(config, node)}, ${ - Code.tuple(implementors.map(_ => `Object.${_.name}`)) + Code.tuple(implementors.map(_ => _.name)) }>`, )), ) diff --git a/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts b/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts index 4659fd570..cfaee08dd 100644 --- a/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts +++ b/tests/_/schemas/kitchen-sink/graffle/modules/Schema.ts @@ -18,215 +18,213 @@ export namespace Schema { // // - export namespace Root { - export type Mutation = $.Output.ObjectMutation<{ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - }> - - export type Query = $.Output.ObjectQuery<{ - InputObjectNested: $.Field< - 'InputObjectNested', - $.Output.Nullable<$Scalar.ID>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - InputObjectNestedNonNull: $.Field< - 'InputObjectNestedNonNull', - $.Output.Nullable<$Scalar.ID>, - $.Args<{ - input: $.Input.Field - }, false> - > - /** - * Query enum field documentation. - */ - abcEnum: $.Field<'abcEnum', $.Output.Nullable, null> - argInputObjectCircular: $.Field< - 'argInputObjectCircular', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - date: $.Field<'date', $.Output.Nullable<$Scalar.Date>, null> - dateArg: $.Field< - 'dateArg', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - }, true> - > - dateArgInputObject: $.Field< - 'dateArgInputObject', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - dateArgList: $.Field< - 'dateArgList', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.Date>>> - }, true> - > - dateArgNonNull: $.Field< - 'dateArgNonNull', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$Scalar.Date> - }, false> - > - dateArgNonNullList: $.Field< - 'dateArgNonNullList', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.List<$.Input.Nullable<$Scalar.Date>>> - }, false> - > - dateArgNonNullListNonNull: $.Field< - 'dateArgNonNullListNonNull', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.List<$Scalar.Date>> - }, false> - > - dateInterface1: $.Field<'dateInterface1', $.Output.Nullable, null> - dateList: $.Field<'dateList', $.Output.Nullable<$.Output.List<$Scalar.Date>>, null> - dateListList: $.Field<'dateListList', $.Output.Nullable<$.Output.List<$.Output.List<$Scalar.Date>>>, null> - dateListNonNull: $.Field<'dateListNonNull', $.Output.List<$Scalar.Date>, null> - dateNonNull: $.Field<'dateNonNull', $Scalar.Date, null> - dateObject1: $.Field<'dateObject1', $.Output.Nullable, null> - dateUnion: $.Field<'dateUnion', $.Output.Nullable, null> - error: $.Field< - 'error', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - case: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - interface: $.Field<'interface', $.Output.Nullable, null> - interfaceNonNull: $.Field<'interfaceNonNull', Interface.Interface, null> - interfaceWithArgs: $.Field< - 'interfaceWithArgs', - $.Output.Nullable, - $.Args<{ - id: $.Input.Field<$Scalar.ID> - }, false> - > - listInt: $.Field<'listInt', $.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>, null> - listIntNonNull: $.Field<'listIntNonNull', $.Output.List<$Scalar.Int>, null> - listListInt: $.Field< - 'listListInt', - $.Output.Nullable<$.Output.List<$.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>>>, - null - > - listListIntNonNull: $.Field<'listListIntNonNull', $.Output.List<$.Output.List<$Scalar.Int>>, null> - lowerCaseUnion: $.Field<'lowerCaseUnion', $.Output.Nullable, null> - object: $.Field<'object', $.Output.Nullable, null> - objectList: $.Field<'objectList', $.Output.Nullable<$.Output.List>, null> - objectListNonNull: $.Field<'objectListNonNull', $.Output.List, null> - objectNested: $.Field<'objectNested', $.Output.Nullable, null> - objectNonNull: $.Field<'objectNonNull', Object.Object1, null> - objectWithArgs: $.Field< - 'objectWithArgs', - $.Output.Nullable, - $.Args<{ - boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> - float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - string: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - result: $.Field< - 'result', - $.Output.Nullable, - $.Args<{ - case: $.Input.Field - }, false> - > - resultNonNull: $.Field< - 'resultNonNull', - Union.Result, - $.Args<{ - case: $.Input.Field<$.Input.Nullable> - }, true> - > - string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> - stringWithArgEnum: $.Field< - 'stringWithArgEnum', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ABCEnum: $.Input.Field<$.Input.Nullable> - }, true> - > - stringWithArgInputObject: $.Field< - 'stringWithArgInputObject', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - stringWithArgInputObjectRequired: $.Field< - 'stringWithArgInputObjectRequired', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field - }, false> - > - /** - * The given arguments are reflected back as a JSON string. - */ - stringWithArgs: $.Field< - 'stringWithArgs', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> - float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - string: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - stringWithListArg: $.Field< - 'stringWithListArg', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ints: $.Input.Field<$.Input.Nullable<$.Input.List<$.Input.Nullable<$Scalar.Int>>>> - }, true> - > - stringWithListArgRequired: $.Field< - 'stringWithListArgRequired', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ints: $.Input.Field<$.Input.List<$Scalar.Int>> - }, false> - > - stringWithRequiredArg: $.Field< - 'stringWithRequiredArg', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - string: $.Input.Field<$Scalar.String> - }, false> - > - unionFooBar: $.Field<'unionFooBar', $.Output.Nullable, null> - unionFooBarNonNull: $.Field<'unionFooBarNonNull', Union.FooBarUnion, null> - unionFooBarWithArgs: $.Field< - 'unionFooBarWithArgs', - $.Output.Nullable, - $.Args<{ - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - }, true> - > - unionObject: $.Field<'unionObject', $.Output.Nullable, null> - unionObjectNonNull: $.Field<'unionObjectNonNull', Object.ObjectUnion, null> - }> - } + export type Mutation = $.Output.ObjectMutation<{ + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + }> + + export type Query = $.Output.ObjectQuery<{ + InputObjectNested: $.Field< + 'InputObjectNested', + $.Output.Nullable<$Scalar.ID>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + InputObjectNestedNonNull: $.Field< + 'InputObjectNestedNonNull', + $.Output.Nullable<$Scalar.ID>, + $.Args<{ + input: $.Input.Field + }, false> + > + /** + * Query enum field documentation. + */ + abcEnum: $.Field<'abcEnum', $.Output.Nullable, null> + argInputObjectCircular: $.Field< + 'argInputObjectCircular', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + date: $.Field<'date', $.Output.Nullable<$Scalar.Date>, null> + dateArg: $.Field< + 'dateArg', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + }, true> + > + dateArgInputObject: $.Field< + 'dateArgInputObject', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + dateArgList: $.Field< + 'dateArgList', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.Date>>> + }, true> + > + dateArgNonNull: $.Field< + 'dateArgNonNull', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$Scalar.Date> + }, false> + > + dateArgNonNullList: $.Field< + 'dateArgNonNullList', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.List<$.Input.Nullable<$Scalar.Date>>> + }, false> + > + dateArgNonNullListNonNull: $.Field< + 'dateArgNonNullListNonNull', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.List<$Scalar.Date>> + }, false> + > + dateInterface1: $.Field<'dateInterface1', $.Output.Nullable, null> + dateList: $.Field<'dateList', $.Output.Nullable<$.Output.List<$Scalar.Date>>, null> + dateListList: $.Field<'dateListList', $.Output.Nullable<$.Output.List<$.Output.List<$Scalar.Date>>>, null> + dateListNonNull: $.Field<'dateListNonNull', $.Output.List<$Scalar.Date>, null> + dateNonNull: $.Field<'dateNonNull', $Scalar.Date, null> + dateObject1: $.Field<'dateObject1', $.Output.Nullable, null> + dateUnion: $.Field<'dateUnion', $.Output.Nullable, null> + error: $.Field< + 'error', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + case: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + interface: $.Field<'interface', $.Output.Nullable, null> + interfaceNonNull: $.Field<'interfaceNonNull', Interface, null> + interfaceWithArgs: $.Field< + 'interfaceWithArgs', + $.Output.Nullable, + $.Args<{ + id: $.Input.Field<$Scalar.ID> + }, false> + > + listInt: $.Field<'listInt', $.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>, null> + listIntNonNull: $.Field<'listIntNonNull', $.Output.List<$Scalar.Int>, null> + listListInt: $.Field< + 'listListInt', + $.Output.Nullable<$.Output.List<$.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>>>, + null + > + listListIntNonNull: $.Field<'listListIntNonNull', $.Output.List<$.Output.List<$Scalar.Int>>, null> + lowerCaseUnion: $.Field<'lowerCaseUnion', $.Output.Nullable, null> + object: $.Field<'object', $.Output.Nullable, null> + objectList: $.Field<'objectList', $.Output.Nullable<$.Output.List>, null> + objectListNonNull: $.Field<'objectListNonNull', $.Output.List, null> + objectNested: $.Field<'objectNested', $.Output.Nullable, null> + objectNonNull: $.Field<'objectNonNull', Object1, null> + objectWithArgs: $.Field< + 'objectWithArgs', + $.Output.Nullable, + $.Args<{ + boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> + float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + string: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + result: $.Field< + 'result', + $.Output.Nullable, + $.Args<{ + case: $.Input.Field + }, false> + > + resultNonNull: $.Field< + 'resultNonNull', + Result, + $.Args<{ + case: $.Input.Field<$.Input.Nullable> + }, true> + > + string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> + stringWithArgEnum: $.Field< + 'stringWithArgEnum', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ABCEnum: $.Input.Field<$.Input.Nullable> + }, true> + > + stringWithArgInputObject: $.Field< + 'stringWithArgInputObject', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + stringWithArgInputObjectRequired: $.Field< + 'stringWithArgInputObjectRequired', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field + }, false> + > + /** + * The given arguments are reflected back as a JSON string. + */ + stringWithArgs: $.Field< + 'stringWithArgs', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> + float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + string: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + stringWithListArg: $.Field< + 'stringWithListArg', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ints: $.Input.Field<$.Input.Nullable<$.Input.List<$.Input.Nullable<$Scalar.Int>>>> + }, true> + > + stringWithListArgRequired: $.Field< + 'stringWithListArgRequired', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ints: $.Input.Field<$.Input.List<$Scalar.Int>> + }, false> + > + stringWithRequiredArg: $.Field< + 'stringWithRequiredArg', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + string: $.Input.Field<$Scalar.String> + }, false> + > + unionFooBar: $.Field<'unionFooBar', $.Output.Nullable, null> + unionFooBarNonNull: $.Field<'unionFooBarNonNull', FooBarUnion, null> + unionFooBarWithArgs: $.Field< + 'unionFooBarWithArgs', + $.Output.Nullable, + $.Args<{ + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + }, true> + > + unionObject: $.Field<'unionObject', $.Output.Nullable, null> + unionObjectNonNull: $.Field<'unionObjectNonNull', ObjectUnion, null> + }> // // @@ -244,19 +242,17 @@ export namespace Schema { // // - export namespace Enum { - /** - * Enum documentation. - * - * Members - * "A" - (DEPRECATED: Enum value A is deprecated.) - * "B" - Enum B member documentation. - * "C" - (DEPRECATED: Enum value C is deprecated.) - */ - export type ABCEnum = $.Enum<'ABCEnum', ['A', 'B', 'C']> + /** + * Enum documentation. + * + * Members + * "A" - (DEPRECATED: Enum value A is deprecated.) + * "B" - Enum B member documentation. + * "C" - (DEPRECATED: Enum value C is deprecated.) + */ + export type ABCEnum = $.Enum<'ABCEnum', ['A', 'B', 'C']> - export type Case = $.Enum<'Case', ['ErrorOne', 'ErrorTwo', 'Object1']> - } + export type Case = $.Enum<'Case', ['ErrorOne', 'ErrorTwo', 'Object1']> // // @@ -274,27 +270,25 @@ export namespace Schema { // // - export namespace InputObject { - export type InputObject = $.InputObject<'InputObject', { - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - dateRequired: $.Input.Field<$Scalar.Date> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - idRequired: $.Input.Field<$Scalar.ID> - }, true> + export type InputObject = $.InputObject<'InputObject', { + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + dateRequired: $.Input.Field<$Scalar.Date> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + idRequired: $.Input.Field<$Scalar.ID> + }, true> - export type InputObjectCircular = $.InputObject<'InputObjectCircular', { - circular: $.Input.Field<$.Input.Nullable> - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - }, true> + export type InputObjectCircular = $.InputObject<'InputObjectCircular', { + circular: $.Input.Field<$.Input.Nullable> + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + }, true> - export type InputObjectNested = $.InputObject<'InputObjectNested', { - InputObject: $.Input.Field<$.Input.Nullable> - }, true> + export type InputObjectNested = $.InputObject<'InputObjectNested', { + InputObject: $.Input.Field<$.Input.Nullable> + }, true> - export type InputObjectNestedNonNull = $.InputObject<'InputObjectNestedNonNull', { - InputObject: $.Input.Field - }, false> - } + export type InputObjectNestedNonNull = $.InputObject<'InputObjectNestedNonNull', { + InputObject: $.Input.Field + }, false> // // @@ -312,19 +306,17 @@ export namespace Schema { // // - export namespace Interface { - export type DateInterface1 = $.Interface<'DateInterface1', { - date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> - }, [Object.DateObject1]> + export type DateInterface1 = $.Interface<'DateInterface1', { + date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> + }, [DateObject1]> - export type Error = $.Interface<'Error', { - message: $.Field<'message', $Scalar.String, null> - }, [Object.ErrorOne, Object.ErrorTwo]> + export type Error = $.Interface<'Error', { + message: $.Field<'message', $Scalar.String, null> + }, [ErrorOne, ErrorTwo]> - export type Interface = $.Interface<'Interface', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }, [Object.Object1ImplementingInterface, Object.Object2ImplementingInterface]> - } + export type Interface = $.Interface<'Interface', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }, [Object1ImplementingInterface, Object2ImplementingInterface]> // // @@ -342,76 +334,74 @@ export namespace Schema { // // - export namespace Object { - export type Bar = $.Object$2<'Bar', { - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> + export type Bar = $.Object$2<'Bar', { + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> - export type DateObject1 = $.Object$2<'DateObject1', { - date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> - }> + export type DateObject1 = $.Object$2<'DateObject1', { + date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> + }> - export type DateObject2 = $.Object$2<'DateObject2', { - date2: $.Field<'date2', $.Output.Nullable<$Scalar.Date>, null> - }> + export type DateObject2 = $.Object$2<'DateObject2', { + date2: $.Field<'date2', $.Output.Nullable<$Scalar.Date>, null> + }> - export type ErrorOne = $.Object$2<'ErrorOne', { - infoId: $.Field<'infoId', $.Output.Nullable<$Scalar.ID>, null> - message: $.Field<'message', $Scalar.String, null> - }> + export type ErrorOne = $.Object$2<'ErrorOne', { + infoId: $.Field<'infoId', $.Output.Nullable<$Scalar.ID>, null> + message: $.Field<'message', $Scalar.String, null> + }> - export type ErrorTwo = $.Object$2<'ErrorTwo', { - infoInt: $.Field<'infoInt', $.Output.Nullable<$Scalar.Int>, null> - message: $.Field<'message', $Scalar.String, null> - }> + export type ErrorTwo = $.Object$2<'ErrorTwo', { + infoInt: $.Field<'infoInt', $.Output.Nullable<$Scalar.Int>, null> + message: $.Field<'message', $Scalar.String, null> + }> + /** + * Object documentation. + */ + export type Foo = $.Object$2<'Foo', { /** - * Object documentation. + * Field documentation. + * + * @deprecated Field a is deprecated. */ - export type Foo = $.Object$2<'Foo', { - /** - * Field documentation. - * - * @deprecated Field a is deprecated. - */ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type Object1 = $.Object$2<'Object1', { - boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> - float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> - }> - - export type Object1ImplementingInterface = $.Object$2<'Object1ImplementingInterface', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> - - export type Object2ImplementingInterface = $.Object$2<'Object2ImplementingInterface', { - boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type ObjectNested = $.Object$2<'ObjectNested', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - object: $.Field<'object', $.Output.Nullable, null> - }> - - export type ObjectUnion = $.Object$2<'ObjectUnion', { - fooBarUnion: $.Field<'fooBarUnion', $.Output.Nullable, null> - }> - - export type lowerCaseObject = $.Object$2<'lowerCaseObject', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type lowerCaseObject2 = $.Object$2<'lowerCaseObject2', { - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> - } + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type Object1 = $.Object$2<'Object1', { + boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> + float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> + }> + + export type Object1ImplementingInterface = $.Object$2<'Object1ImplementingInterface', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> + + export type Object2ImplementingInterface = $.Object$2<'Object2ImplementingInterface', { + boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type ObjectNested = $.Object$2<'ObjectNested', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + object: $.Field<'object', $.Output.Nullable, null> + }> + + export type ObjectUnion = $.Object$2<'ObjectUnion', { + fooBarUnion: $.Field<'fooBarUnion', $.Output.Nullable, null> + }> + + export type lowerCaseObject = $.Object$2<'lowerCaseObject', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type lowerCaseObject2 = $.Object$2<'lowerCaseObject2', { + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> // // @@ -429,18 +419,16 @@ export namespace Schema { // // - export namespace Union { - export type DateUnion = $.Union<'DateUnion', [Object.DateObject1, Object.DateObject2]> + export type DateUnion = $.Union<'DateUnion', [DateObject1, DateObject2]> - /** - * Union documentation. - */ - export type FooBarUnion = $.Union<'FooBarUnion', [Object.Bar, Object.Foo]> + /** + * Union documentation. + */ + export type FooBarUnion = $.Union<'FooBarUnion', [Bar, Foo]> - export type Result = $.Union<'Result', [Object.ErrorOne, Object.ErrorTwo, Object.Object1]> + export type Result = $.Union<'Result', [ErrorOne, ErrorTwo, Object1]> - export type lowerCaseUnion = $.Union<'lowerCaseUnion', [Object.lowerCaseObject, Object.lowerCaseObject2]> - } + export type lowerCaseUnion = $.Union<'lowerCaseUnion', [lowerCaseObject, lowerCaseObject2]> } // // @@ -465,63 +453,63 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Mutation', 'Query'] - RootUnion: Schema.Root.Mutation | Schema.Root.Query + RootUnion: Schema.Mutation | Schema.Query Root: { - Query: Schema.Root.Query - Mutation: Schema.Root.Mutation + Query: Schema.Query + Mutation: Schema.Mutation Subscription: null } allTypes: { - Mutation: Schema.Root.Mutation - Query: Schema.Root.Query - ABCEnum: Schema.Enum.ABCEnum - Case: Schema.Enum.Case - Bar: Schema.Object.Bar - DateObject1: Schema.Object.DateObject1 - DateObject2: Schema.Object.DateObject2 - ErrorOne: Schema.Object.ErrorOne - ErrorTwo: Schema.Object.ErrorTwo - Foo: Schema.Object.Foo - Object1: Schema.Object.Object1 - Object1ImplementingInterface: Schema.Object.Object1ImplementingInterface - Object2ImplementingInterface: Schema.Object.Object2ImplementingInterface - ObjectNested: Schema.Object.ObjectNested - ObjectUnion: Schema.Object.ObjectUnion - lowerCaseObject: Schema.Object.lowerCaseObject - lowerCaseObject2: Schema.Object.lowerCaseObject2 - DateUnion: Schema.Union.DateUnion - FooBarUnion: Schema.Union.FooBarUnion - Result: Schema.Union.Result - lowerCaseUnion: Schema.Union.lowerCaseUnion - DateInterface1: Schema.Interface.DateInterface1 - Error: Schema.Interface.Error - Interface: Schema.Interface.Interface + Mutation: Schema.Mutation + Query: Schema.Query + ABCEnum: Schema.ABCEnum + Case: Schema.Case + Bar: Schema.Bar + DateObject1: Schema.DateObject1 + DateObject2: Schema.DateObject2 + ErrorOne: Schema.ErrorOne + ErrorTwo: Schema.ErrorTwo + Foo: Schema.Foo + Object1: Schema.Object1 + Object1ImplementingInterface: Schema.Object1ImplementingInterface + Object2ImplementingInterface: Schema.Object2ImplementingInterface + ObjectNested: Schema.ObjectNested + ObjectUnion: Schema.ObjectUnion + lowerCaseObject: Schema.lowerCaseObject + lowerCaseObject2: Schema.lowerCaseObject2 + DateUnion: Schema.DateUnion + FooBarUnion: Schema.FooBarUnion + Result: Schema.Result + lowerCaseUnion: Schema.lowerCaseUnion + DateInterface1: Schema.DateInterface1 + Error: Schema.Error + Interface: Schema.Interface } objects: { - Bar: Schema.Object.Bar - DateObject1: Schema.Object.DateObject1 - DateObject2: Schema.Object.DateObject2 - ErrorOne: Schema.Object.ErrorOne - ErrorTwo: Schema.Object.ErrorTwo - Foo: Schema.Object.Foo - Object1: Schema.Object.Object1 - Object1ImplementingInterface: Schema.Object.Object1ImplementingInterface - Object2ImplementingInterface: Schema.Object.Object2ImplementingInterface - ObjectNested: Schema.Object.ObjectNested - ObjectUnion: Schema.Object.ObjectUnion - lowerCaseObject: Schema.Object.lowerCaseObject - lowerCaseObject2: Schema.Object.lowerCaseObject2 + Bar: Schema.Bar + DateObject1: Schema.DateObject1 + DateObject2: Schema.DateObject2 + ErrorOne: Schema.ErrorOne + ErrorTwo: Schema.ErrorTwo + Foo: Schema.Foo + Object1: Schema.Object1 + Object1ImplementingInterface: Schema.Object1ImplementingInterface + Object2ImplementingInterface: Schema.Object2ImplementingInterface + ObjectNested: Schema.ObjectNested + ObjectUnion: Schema.ObjectUnion + lowerCaseObject: Schema.lowerCaseObject + lowerCaseObject2: Schema.lowerCaseObject2 } unions: { - DateUnion: Schema.Union.DateUnion - FooBarUnion: Schema.Union.FooBarUnion - Result: Schema.Union.Result - lowerCaseUnion: Schema.Union.lowerCaseUnion + DateUnion: Schema.DateUnion + FooBarUnion: Schema.FooBarUnion + Result: Schema.Result + lowerCaseUnion: Schema.lowerCaseUnion } interfaces: { - DateInterface1: Schema.Interface.DateInterface1 - Error: Schema.Interface.Error - Interface: Schema.Interface.Interface + DateInterface1: Schema.DateInterface1 + Error: Schema.Error + Interface: Schema.Interface } customScalars: Utilities.SchemaIndexBase['customScalars'] extensions: Utilities.GlobalRegistry.TypeExtensions diff --git a/tests/_/schemas/mutation-only/graffle/modules/Schema.ts b/tests/_/schemas/mutation-only/graffle/modules/Schema.ts index a8e1fcc15..920baef2e 100644 --- a/tests/_/schemas/mutation-only/graffle/modules/Schema.ts +++ b/tests/_/schemas/mutation-only/graffle/modules/Schema.ts @@ -18,12 +18,10 @@ export namespace Schema { // // - export namespace Root { - export type Mutation = $.Output.ObjectMutation<{ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - }> - } + export type Mutation = $.Output.ObjectMutation<{ + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + }> // // @@ -41,9 +39,7 @@ export namespace Schema { // // - export namespace Enum { - // -- no types -- - } + // -- no types -- // // @@ -61,9 +57,7 @@ export namespace Schema { // // - export namespace InputObject { - // -- no types -- - } + // -- no types -- // // @@ -81,9 +75,7 @@ export namespace Schema { // // - export namespace Interface { - // -- no types -- - } + // -- no types -- // // @@ -101,9 +93,7 @@ export namespace Schema { // // - export namespace Object { - // -- no types -- - } + // -- no types -- // // @@ -121,9 +111,7 @@ export namespace Schema { // // - export namespace Union { - // -- no types -- - } + // -- no types -- } // // @@ -148,14 +136,14 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Mutation'] - RootUnion: Schema.Root.Mutation + RootUnion: Schema.Mutation Root: { Query: null - Mutation: Schema.Root.Mutation + Mutation: Schema.Mutation Subscription: null } allTypes: { - Mutation: Schema.Root.Mutation + Mutation: Schema.Mutation } objects: {} unions: {} diff --git a/tests/_/schemas/pokemon/graffle/modules/Schema.ts b/tests/_/schemas/pokemon/graffle/modules/Schema.ts index 92798a932..5d5b0d397 100644 --- a/tests/_/schemas/pokemon/graffle/modules/Schema.ts +++ b/tests/_/schemas/pokemon/graffle/modules/Schema.ts @@ -18,49 +18,47 @@ export namespace Schema { // // - export namespace Root { - export type Mutation = $.Output.ObjectMutation<{ - addPokemon: $.Field< - 'addPokemon', - $.Output.Nullable, - $.Args<{ - attack: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - defense: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - hp: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - name: $.Input.Field<$Scalar.String> - type: $.Input.Field - }, false> - > - }> + export type Mutation = $.Output.ObjectMutation<{ + addPokemon: $.Field< + 'addPokemon', + $.Output.Nullable, + $.Args<{ + attack: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + defense: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + hp: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + name: $.Input.Field<$Scalar.String> + type: $.Input.Field + }, false> + > + }> - export type Query = $.Output.ObjectQuery<{ - battles: $.Field<'battles', $.Output.List, null> - beings: $.Field<'beings', $.Output.List, null> - pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> - pokemonByName: $.Field< - 'pokemonByName', - $.Output.Nullable<$.Output.List>, - $.Args<{ - name: $.Input.Field<$Scalar.String> - }, false> - > - pokemons: $.Field< - 'pokemons', - $.Output.Nullable<$.Output.List>, - $.Args<{ - filter: $.Input.Field<$.Input.Nullable> - }, true> - > - trainerByName: $.Field< - 'trainerByName', - $.Output.Nullable, - $.Args<{ - name: $.Input.Field<$Scalar.String> - }, false> - > - trainers: $.Field<'trainers', $.Output.Nullable<$.Output.List>, null> - }> - } + export type Query = $.Output.ObjectQuery<{ + battles: $.Field<'battles', $.Output.List, null> + beings: $.Field<'beings', $.Output.List, null> + pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> + pokemonByName: $.Field< + 'pokemonByName', + $.Output.Nullable<$.Output.List>, + $.Args<{ + name: $.Input.Field<$Scalar.String> + }, false> + > + pokemons: $.Field< + 'pokemons', + $.Output.Nullable<$.Output.List>, + $.Args<{ + filter: $.Input.Field<$.Input.Nullable> + }, true> + > + trainerByName: $.Field< + 'trainerByName', + $.Output.Nullable, + $.Args<{ + name: $.Input.Field<$Scalar.String> + }, false> + > + trainers: $.Field<'trainers', $.Output.Nullable<$.Output.List>, null> + }> // // @@ -78,33 +76,28 @@ export namespace Schema { // // - export namespace Enum { - export type BattleWildResult = $.Enum< - 'BattleWildResult', - ['pokemonsCaptured', 'pokemonsDefeated', 'trainerDefeated'] - > + export type BattleWildResult = $.Enum<'BattleWildResult', ['pokemonsCaptured', 'pokemonsDefeated', 'trainerDefeated']> - export type PokemonType = $.Enum<'PokemonType', ['bug', 'electric', 'fire', 'grass', 'water']> + export type PokemonType = $.Enum<'PokemonType', ['bug', 'electric', 'fire', 'grass', 'water']> - export type TrainerClass = $.Enum< - 'TrainerClass', - [ - 'bugCatcher', - 'camper', - 'picnicker', - 'psychic', - 'psychicMedium', - 'psychicYoungster', - 'sailor', - 'superNerd', - 'tamer', - 'teamRocketGrunt', - 'triathlete', - 'youngster', - 'youth', - ] - > - } + export type TrainerClass = $.Enum< + 'TrainerClass', + [ + 'bugCatcher', + 'camper', + 'picnicker', + 'psychic', + 'psychicMedium', + 'psychicYoungster', + 'sailor', + 'superNerd', + 'tamer', + 'teamRocketGrunt', + 'triathlete', + 'youngster', + 'youth', + ] + > // // @@ -122,22 +115,20 @@ export namespace Schema { // // - export namespace InputObject { - export type DateFilter = $.InputObject<'DateFilter', { - gte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - lte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - }, true> + export type DateFilter = $.InputObject<'DateFilter', { + gte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + lte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + }, true> - export type PokemonFilter = $.InputObject<'PokemonFilter', { - birthday: $.Input.Field<$.Input.Nullable> - name: $.Input.Field<$.Input.Nullable> - }, true> + export type PokemonFilter = $.InputObject<'PokemonFilter', { + birthday: $.Input.Field<$.Input.Nullable> + name: $.Input.Field<$.Input.Nullable> + }, true> - export type StringFilter = $.InputObject<'StringFilter', { - contains: $.Input.Field<$.Input.Nullable<$Scalar.String>> - in: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> - }, true> - } + export type StringFilter = $.InputObject<'StringFilter', { + contains: $.Input.Field<$.Input.Nullable<$Scalar.String>> + in: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> + }, true> // // @@ -155,12 +146,10 @@ export namespace Schema { // // - export namespace Interface { - export type Being = $.Interface<'Being', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - }, [Object.Patron, Object.Pokemon, Object.Trainer]> - } + export type Being = $.Interface<'Being', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + }, [Patron, Pokemon, Trainer]> // // @@ -178,66 +167,64 @@ export namespace Schema { // // - export namespace Object { - export type BattleRoyale = $.Object$2<'BattleRoyale', { - combatants: $.Field<'combatants', $.Output.Nullable<$.Output.List>, null> - date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - winner: $.Field<'winner', $.Output.Nullable, null> - }> + export type BattleRoyale = $.Object$2<'BattleRoyale', { + combatants: $.Field<'combatants', $.Output.Nullable<$.Output.List>, null> + date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + winner: $.Field<'winner', $.Output.Nullable, null> + }> - export type BattleTrainer = $.Object$2<'BattleTrainer', { - combatant1: $.Field<'combatant1', $.Output.Nullable, null> - combatant2: $.Field<'combatant2', $.Output.Nullable, null> - date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - winner: $.Field<'winner', $.Output.Nullable, null> - }> + export type BattleTrainer = $.Object$2<'BattleTrainer', { + combatant1: $.Field<'combatant1', $.Output.Nullable, null> + combatant2: $.Field<'combatant2', $.Output.Nullable, null> + date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + winner: $.Field<'winner', $.Output.Nullable, null> + }> - export type BattleWild = $.Object$2<'BattleWild', { - date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - pokemon: $.Field<'pokemon', $.Output.Nullable, null> - result: $.Field<'result', $.Output.Nullable, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - wildPokemons: $.Field<'wildPokemons', $.Output.Nullable<$.Output.List>, null> - }> + export type BattleWild = $.Object$2<'BattleWild', { + date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + pokemon: $.Field<'pokemon', $.Output.Nullable, null> + result: $.Field<'result', $.Output.Nullable, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + wildPokemons: $.Field<'wildPokemons', $.Output.Nullable<$.Output.List>, null> + }> - export type CombatantMultiPokemon = $.Object$2<'CombatantMultiPokemon', { - pokemons: $.Field<'pokemons', $.Output.Nullable<$.Output.List>, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - }> + export type CombatantMultiPokemon = $.Object$2<'CombatantMultiPokemon', { + pokemons: $.Field<'pokemons', $.Output.Nullable<$.Output.List>, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + }> - export type CombatantSinglePokemon = $.Object$2<'CombatantSinglePokemon', { - pokemon: $.Field<'pokemon', $.Output.Nullable, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - }> + export type CombatantSinglePokemon = $.Object$2<'CombatantSinglePokemon', { + pokemon: $.Field<'pokemon', $.Output.Nullable, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + }> - export type Patron = $.Object$2<'Patron', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - money: $.Field<'money', $.Output.Nullable<$Scalar.Int>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - }> + export type Patron = $.Object$2<'Patron', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + money: $.Field<'money', $.Output.Nullable<$Scalar.Int>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + }> - export type Pokemon = $.Object$2<'Pokemon', { - attack: $.Field<'attack', $.Output.Nullable<$Scalar.Int>, null> - birthday: $.Field<'birthday', $.Output.Nullable<$Scalar.Int>, null> - defense: $.Field<'defense', $.Output.Nullable<$Scalar.Int>, null> - hp: $.Field<'hp', $.Output.Nullable<$Scalar.Int>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - type: $.Field<'type', $.Output.Nullable, null> - }> + export type Pokemon = $.Object$2<'Pokemon', { + attack: $.Field<'attack', $.Output.Nullable<$Scalar.Int>, null> + birthday: $.Field<'birthday', $.Output.Nullable<$Scalar.Int>, null> + defense: $.Field<'defense', $.Output.Nullable<$Scalar.Int>, null> + hp: $.Field<'hp', $.Output.Nullable<$Scalar.Int>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + type: $.Field<'type', $.Output.Nullable, null> + }> - export type Trainer = $.Object$2<'Trainer', { - class: $.Field<'class', $.Output.Nullable, null> - fans: $.Field<'fans', $.Output.Nullable<$.Output.List>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> - }> - } + export type Trainer = $.Object$2<'Trainer', { + class: $.Field<'class', $.Output.Nullable, null> + fans: $.Field<'fans', $.Output.Nullable<$.Output.List>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> + }> // // @@ -255,9 +242,7 @@ export namespace Schema { // // - export namespace Union { - export type Battle = $.Union<'Battle', [Object.BattleRoyale, Object.BattleTrainer, Object.BattleWild]> - } + export type Battle = $.Union<'Battle', [BattleRoyale, BattleTrainer, BattleWild]> } // // @@ -282,44 +267,44 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Mutation', 'Query'] - RootUnion: Schema.Root.Mutation | Schema.Root.Query + RootUnion: Schema.Mutation | Schema.Query Root: { - Query: Schema.Root.Query - Mutation: Schema.Root.Mutation + Query: Schema.Query + Mutation: Schema.Mutation Subscription: null } allTypes: { - Mutation: Schema.Root.Mutation - Query: Schema.Root.Query - BattleWildResult: Schema.Enum.BattleWildResult - PokemonType: Schema.Enum.PokemonType - TrainerClass: Schema.Enum.TrainerClass - BattleRoyale: Schema.Object.BattleRoyale - BattleTrainer: Schema.Object.BattleTrainer - BattleWild: Schema.Object.BattleWild - CombatantMultiPokemon: Schema.Object.CombatantMultiPokemon - CombatantSinglePokemon: Schema.Object.CombatantSinglePokemon - Patron: Schema.Object.Patron - Pokemon: Schema.Object.Pokemon - Trainer: Schema.Object.Trainer - Battle: Schema.Union.Battle - Being: Schema.Interface.Being + Mutation: Schema.Mutation + Query: Schema.Query + BattleWildResult: Schema.BattleWildResult + PokemonType: Schema.PokemonType + TrainerClass: Schema.TrainerClass + BattleRoyale: Schema.BattleRoyale + BattleTrainer: Schema.BattleTrainer + BattleWild: Schema.BattleWild + CombatantMultiPokemon: Schema.CombatantMultiPokemon + CombatantSinglePokemon: Schema.CombatantSinglePokemon + Patron: Schema.Patron + Pokemon: Schema.Pokemon + Trainer: Schema.Trainer + Battle: Schema.Battle + Being: Schema.Being } objects: { - BattleRoyale: Schema.Object.BattleRoyale - BattleTrainer: Schema.Object.BattleTrainer - BattleWild: Schema.Object.BattleWild - CombatantMultiPokemon: Schema.Object.CombatantMultiPokemon - CombatantSinglePokemon: Schema.Object.CombatantSinglePokemon - Patron: Schema.Object.Patron - Pokemon: Schema.Object.Pokemon - Trainer: Schema.Object.Trainer + BattleRoyale: Schema.BattleRoyale + BattleTrainer: Schema.BattleTrainer + BattleWild: Schema.BattleWild + CombatantMultiPokemon: Schema.CombatantMultiPokemon + CombatantSinglePokemon: Schema.CombatantSinglePokemon + Patron: Schema.Patron + Pokemon: Schema.Pokemon + Trainer: Schema.Trainer } unions: { - Battle: Schema.Union.Battle + Battle: Schema.Battle } interfaces: { - Being: Schema.Interface.Being + Being: Schema.Being } customScalars: Utilities.SchemaIndexBase['customScalars'] extensions: Utilities.GlobalRegistry.TypeExtensions diff --git a/tests/_/schemas/query-only/graffle/modules/Schema.ts b/tests/_/schemas/query-only/graffle/modules/Schema.ts index e510c4f45..b9003b941 100644 --- a/tests/_/schemas/query-only/graffle/modules/Schema.ts +++ b/tests/_/schemas/query-only/graffle/modules/Schema.ts @@ -18,12 +18,10 @@ export namespace Schema { // // - export namespace Root { - export type Query = $.Output.ObjectQuery<{ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - }> - } + export type Query = $.Output.ObjectQuery<{ + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + }> // // @@ -41,9 +39,7 @@ export namespace Schema { // // - export namespace Enum { - // -- no types -- - } + // -- no types -- // // @@ -61,9 +57,7 @@ export namespace Schema { // // - export namespace InputObject { - // -- no types -- - } + // -- no types -- // // @@ -81,9 +75,7 @@ export namespace Schema { // // - export namespace Interface { - // -- no types -- - } + // -- no types -- // // @@ -101,9 +93,7 @@ export namespace Schema { // // - export namespace Object { - // -- no types -- - } + // -- no types -- // // @@ -121,9 +111,7 @@ export namespace Schema { // // - export namespace Union { - // -- no types -- - } + // -- no types -- } // // @@ -148,14 +136,14 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Query'] - RootUnion: Schema.Root.Query + RootUnion: Schema.Query Root: { - Query: Schema.Root.Query + Query: Schema.Query Mutation: null Subscription: null } allTypes: { - Query: Schema.Root.Query + Query: Schema.Query } objects: {} unions: {} diff --git a/website/graffle/modules/Schema.ts b/website/graffle/modules/Schema.ts index f122a5d91..be4c7381f 100644 --- a/website/graffle/modules/Schema.ts +++ b/website/graffle/modules/Schema.ts @@ -18,52 +18,50 @@ export namespace Schema { // // - export namespace Root { - export type Query = $.Output.ObjectQuery<{ - continent: $.Field< - 'continent', - $.Output.Nullable, - $.Args<{ - code: $.Input.Field<$Scalar.ID> - }, false> - > - continents: $.Field< - 'continents', - $.Output.List, - $.Args<{ - filter: $.Input.Field<$.Input.Nullable> - }, true> - > - countries: $.Field< - 'countries', - $.Output.List, - $.Args<{ - filter: $.Input.Field<$.Input.Nullable> - }, true> - > - country: $.Field< - 'country', - $.Output.Nullable, - $.Args<{ - code: $.Input.Field<$Scalar.ID> - }, false> - > - language: $.Field< - 'language', - $.Output.Nullable, - $.Args<{ - code: $.Input.Field<$Scalar.ID> - }, false> - > - languages: $.Field< - 'languages', - $.Output.List, - $.Args<{ - filter: $.Input.Field<$.Input.Nullable> - }, true> - > - }> - } + export type Query = $.Output.ObjectQuery<{ + continent: $.Field< + 'continent', + $.Output.Nullable, + $.Args<{ + code: $.Input.Field<$Scalar.ID> + }, false> + > + continents: $.Field< + 'continents', + $.Output.List, + $.Args<{ + filter: $.Input.Field<$.Input.Nullable> + }, true> + > + countries: $.Field< + 'countries', + $.Output.List, + $.Args<{ + filter: $.Input.Field<$.Input.Nullable> + }, true> + > + country: $.Field< + 'country', + $.Output.Nullable, + $.Args<{ + code: $.Input.Field<$Scalar.ID> + }, false> + > + language: $.Field< + 'language', + $.Output.Nullable, + $.Args<{ + code: $.Input.Field<$Scalar.ID> + }, false> + > + languages: $.Field< + 'languages', + $.Output.List, + $.Args<{ + filter: $.Input.Field<$.Input.Nullable> + }, true> + > + }> // // @@ -81,9 +79,7 @@ export namespace Schema { // // - export namespace Enum { - // -- no types -- - } + // -- no types -- // // @@ -101,30 +97,28 @@ export namespace Schema { // // - export namespace InputObject { - export type ContinentFilterInput = $.InputObject<'ContinentFilterInput', { - code: $.Input.Field<$.Input.Nullable> - }, true> + export type ContinentFilterInput = $.InputObject<'ContinentFilterInput', { + code: $.Input.Field<$.Input.Nullable> + }, true> - export type CountryFilterInput = $.InputObject<'CountryFilterInput', { - code: $.Input.Field<$.Input.Nullable> - continent: $.Input.Field<$.Input.Nullable> - currency: $.Input.Field<$.Input.Nullable> - name: $.Input.Field<$.Input.Nullable> - }, true> + export type CountryFilterInput = $.InputObject<'CountryFilterInput', { + code: $.Input.Field<$.Input.Nullable> + continent: $.Input.Field<$.Input.Nullable> + currency: $.Input.Field<$.Input.Nullable> + name: $.Input.Field<$.Input.Nullable> + }, true> - export type LanguageFilterInput = $.InputObject<'LanguageFilterInput', { - code: $.Input.Field<$.Input.Nullable> - }, true> + export type LanguageFilterInput = $.InputObject<'LanguageFilterInput', { + code: $.Input.Field<$.Input.Nullable> + }, true> - export type StringQueryOperatorInput = $.InputObject<'StringQueryOperatorInput', { - eq: $.Input.Field<$.Input.Nullable<$Scalar.String>> - in: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> - ne: $.Input.Field<$.Input.Nullable<$Scalar.String>> - nin: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> - regex: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - } + export type StringQueryOperatorInput = $.InputObject<'StringQueryOperatorInput', { + eq: $.Input.Field<$.Input.Nullable<$Scalar.String>> + in: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> + ne: $.Input.Field<$.Input.Nullable<$Scalar.String>> + nin: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> + regex: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> // // @@ -142,9 +136,7 @@ export namespace Schema { // // - export namespace Interface { - // -- no types -- - } + // -- no types -- // // @@ -162,56 +154,54 @@ export namespace Schema { // // - export namespace Object { - export type Continent = $.Object$2<'Continent', { - code: $.Field<'code', $Scalar.ID, null> - countries: $.Field<'countries', $.Output.List, null> - name: $.Field<'name', $Scalar.String, null> - }> + export type Continent = $.Object$2<'Continent', { + code: $.Field<'code', $Scalar.ID, null> + countries: $.Field<'countries', $.Output.List, null> + name: $.Field<'name', $Scalar.String, null> + }> - export type Country = $.Object$2<'Country', { - awsRegion: $.Field<'awsRegion', $Scalar.String, null> - capital: $.Field<'capital', $.Output.Nullable<$Scalar.String>, null> - code: $.Field<'code', $Scalar.ID, null> - continent: $.Field<'continent', Object.Continent, null> - currencies: $.Field<'currencies', $.Output.List<$Scalar.String>, null> - currency: $.Field<'currency', $.Output.Nullable<$Scalar.String>, null> - emoji: $.Field<'emoji', $Scalar.String, null> - emojiU: $.Field<'emojiU', $Scalar.String, null> - languages: $.Field<'languages', $.Output.List, null> - name: $.Field< - 'name', - $Scalar.String, - $.Args<{ - lang: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - native: $.Field<'native', $Scalar.String, null> - phone: $.Field<'phone', $Scalar.String, null> - phones: $.Field<'phones', $.Output.List<$Scalar.String>, null> - states: $.Field<'states', $.Output.List, null> - subdivisions: $.Field<'subdivisions', $.Output.List, null> - }> + export type Country = $.Object$2<'Country', { + awsRegion: $.Field<'awsRegion', $Scalar.String, null> + capital: $.Field<'capital', $.Output.Nullable<$Scalar.String>, null> + code: $.Field<'code', $Scalar.ID, null> + continent: $.Field<'continent', Continent, null> + currencies: $.Field<'currencies', $.Output.List<$Scalar.String>, null> + currency: $.Field<'currency', $.Output.Nullable<$Scalar.String>, null> + emoji: $.Field<'emoji', $Scalar.String, null> + emojiU: $.Field<'emojiU', $Scalar.String, null> + languages: $.Field<'languages', $.Output.List, null> + name: $.Field< + 'name', + $Scalar.String, + $.Args<{ + lang: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + native: $.Field<'native', $Scalar.String, null> + phone: $.Field<'phone', $Scalar.String, null> + phones: $.Field<'phones', $.Output.List<$Scalar.String>, null> + states: $.Field<'states', $.Output.List, null> + subdivisions: $.Field<'subdivisions', $.Output.List, null> + }> - export type Language = $.Object$2<'Language', { - code: $.Field<'code', $Scalar.ID, null> - name: $.Field<'name', $Scalar.String, null> - native: $.Field<'native', $Scalar.String, null> - rtl: $.Field<'rtl', $Scalar.Boolean, null> - }> + export type Language = $.Object$2<'Language', { + code: $.Field<'code', $Scalar.ID, null> + name: $.Field<'name', $Scalar.String, null> + native: $.Field<'native', $Scalar.String, null> + rtl: $.Field<'rtl', $Scalar.Boolean, null> + }> - export type State = $.Object$2<'State', { - code: $.Field<'code', $.Output.Nullable<$Scalar.String>, null> - country: $.Field<'country', Object.Country, null> - name: $.Field<'name', $Scalar.String, null> - }> + export type State = $.Object$2<'State', { + code: $.Field<'code', $.Output.Nullable<$Scalar.String>, null> + country: $.Field<'country', Country, null> + name: $.Field<'name', $Scalar.String, null> + }> - export type Subdivision = $.Object$2<'Subdivision', { - code: $.Field<'code', $Scalar.ID, null> - emoji: $.Field<'emoji', $.Output.Nullable<$Scalar.String>, null> - name: $.Field<'name', $Scalar.String, null> - }> - } + export type Subdivision = $.Object$2<'Subdivision', { + code: $.Field<'code', $Scalar.ID, null> + emoji: $.Field<'emoji', $.Output.Nullable<$Scalar.String>, null> + name: $.Field<'name', $Scalar.String, null> + }> // // @@ -229,9 +219,7 @@ export namespace Schema { // // - export namespace Union { - // -- no types -- - } + // -- no types -- } // // @@ -256,26 +244,26 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Query'] - RootUnion: Schema.Root.Query + RootUnion: Schema.Query Root: { - Query: Schema.Root.Query + Query: Schema.Query Mutation: null Subscription: null } allTypes: { - Query: Schema.Root.Query - Continent: Schema.Object.Continent - Country: Schema.Object.Country - Language: Schema.Object.Language - State: Schema.Object.State - Subdivision: Schema.Object.Subdivision + Query: Schema.Query + Continent: Schema.Continent + Country: Schema.Country + Language: Schema.Language + State: Schema.State + Subdivision: Schema.Subdivision } objects: { - Continent: Schema.Object.Continent - Country: Schema.Object.Country - Language: Schema.Object.Language - State: Schema.Object.State - Subdivision: Schema.Object.Subdivision + Continent: Schema.Continent + Country: Schema.Country + Language: Schema.Language + State: Schema.State + Subdivision: Schema.Subdivision } unions: {} interfaces: {} diff --git a/website/pokemon/modules/Schema.ts b/website/pokemon/modules/Schema.ts index 1616f245a..ecb221efc 100644 --- a/website/pokemon/modules/Schema.ts +++ b/website/pokemon/modules/Schema.ts @@ -18,49 +18,47 @@ export namespace Schema { // // - export namespace Root { - export type Mutation = $.Output.ObjectMutation<{ - addPokemon: $.Field< - 'addPokemon', - $.Output.Nullable, - $.Args<{ - attack: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - defense: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - hp: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - name: $.Input.Field<$Scalar.String> - type: $.Input.Field - }, false> - > - }> + export type Mutation = $.Output.ObjectMutation<{ + addPokemon: $.Field< + 'addPokemon', + $.Output.Nullable, + $.Args<{ + attack: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + defense: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + hp: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + name: $.Input.Field<$Scalar.String> + type: $.Input.Field + }, false> + > + }> - export type Query = $.Output.ObjectQuery<{ - battles: $.Field<'battles', $.Output.List, null> - beings: $.Field<'beings', $.Output.List, null> - pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> - pokemonByName: $.Field< - 'pokemonByName', - $.Output.Nullable<$.Output.List>, - $.Args<{ - name: $.Input.Field<$Scalar.String> - }, false> - > - pokemons: $.Field< - 'pokemons', - $.Output.Nullable<$.Output.List>, - $.Args<{ - filter: $.Input.Field<$.Input.Nullable> - }, true> - > - trainerByName: $.Field< - 'trainerByName', - $.Output.Nullable, - $.Args<{ - name: $.Input.Field<$Scalar.String> - }, false> - > - trainers: $.Field<'trainers', $.Output.Nullable<$.Output.List>, null> - }> - } + export type Query = $.Output.ObjectQuery<{ + battles: $.Field<'battles', $.Output.List, null> + beings: $.Field<'beings', $.Output.List, null> + pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> + pokemonByName: $.Field< + 'pokemonByName', + $.Output.Nullable<$.Output.List>, + $.Args<{ + name: $.Input.Field<$Scalar.String> + }, false> + > + pokemons: $.Field< + 'pokemons', + $.Output.Nullable<$.Output.List>, + $.Args<{ + filter: $.Input.Field<$.Input.Nullable> + }, true> + > + trainerByName: $.Field< + 'trainerByName', + $.Output.Nullable, + $.Args<{ + name: $.Input.Field<$Scalar.String> + }, false> + > + trainers: $.Field<'trainers', $.Output.Nullable<$.Output.List>, null> + }> // // @@ -78,33 +76,28 @@ export namespace Schema { // // - export namespace Enum { - export type BattleWildResult = $.Enum< - 'BattleWildResult', - ['pokemonsCaptured', 'pokemonsDefeated', 'trainerDefeated'] - > + export type BattleWildResult = $.Enum<'BattleWildResult', ['pokemonsCaptured', 'pokemonsDefeated', 'trainerDefeated']> - export type PokemonType = $.Enum<'PokemonType', ['bug', 'electric', 'fire', 'grass', 'water']> + export type PokemonType = $.Enum<'PokemonType', ['bug', 'electric', 'fire', 'grass', 'water']> - export type TrainerClass = $.Enum< - 'TrainerClass', - [ - 'bugCatcher', - 'camper', - 'picnicker', - 'psychic', - 'psychicMedium', - 'psychicYoungster', - 'sailor', - 'superNerd', - 'tamer', - 'teamRocketGrunt', - 'triathlete', - 'youngster', - 'youth', - ] - > - } + export type TrainerClass = $.Enum< + 'TrainerClass', + [ + 'bugCatcher', + 'camper', + 'picnicker', + 'psychic', + 'psychicMedium', + 'psychicYoungster', + 'sailor', + 'superNerd', + 'tamer', + 'teamRocketGrunt', + 'triathlete', + 'youngster', + 'youth', + ] + > // // @@ -122,22 +115,20 @@ export namespace Schema { // // - export namespace InputObject { - export type DateFilter = $.InputObject<'DateFilter', { - gte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - lte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - }, true> + export type DateFilter = $.InputObject<'DateFilter', { + gte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + lte: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + }, true> - export type PokemonFilter = $.InputObject<'PokemonFilter', { - birthday: $.Input.Field<$.Input.Nullable> - name: $.Input.Field<$.Input.Nullable> - }, true> + export type PokemonFilter = $.InputObject<'PokemonFilter', { + birthday: $.Input.Field<$.Input.Nullable> + name: $.Input.Field<$.Input.Nullable> + }, true> - export type StringFilter = $.InputObject<'StringFilter', { - contains: $.Input.Field<$.Input.Nullable<$Scalar.String>> - in: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> - }, true> - } + export type StringFilter = $.InputObject<'StringFilter', { + contains: $.Input.Field<$.Input.Nullable<$Scalar.String>> + in: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.String>>> + }, true> // // @@ -155,12 +146,10 @@ export namespace Schema { // // - export namespace Interface { - export type Being = $.Interface<'Being', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - }, [Object.Patron, Object.Pokemon, Object.Trainer]> - } + export type Being = $.Interface<'Being', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + }, [Patron, Pokemon, Trainer]> // // @@ -178,66 +167,64 @@ export namespace Schema { // // - export namespace Object { - export type BattleRoyale = $.Object$2<'BattleRoyale', { - combatants: $.Field<'combatants', $.Output.Nullable<$.Output.List>, null> - date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - winner: $.Field<'winner', $.Output.Nullable, null> - }> + export type BattleRoyale = $.Object$2<'BattleRoyale', { + combatants: $.Field<'combatants', $.Output.Nullable<$.Output.List>, null> + date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + winner: $.Field<'winner', $.Output.Nullable, null> + }> - export type BattleTrainer = $.Object$2<'BattleTrainer', { - combatant1: $.Field<'combatant1', $.Output.Nullable, null> - combatant2: $.Field<'combatant2', $.Output.Nullable, null> - date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - winner: $.Field<'winner', $.Output.Nullable, null> - }> + export type BattleTrainer = $.Object$2<'BattleTrainer', { + combatant1: $.Field<'combatant1', $.Output.Nullable, null> + combatant2: $.Field<'combatant2', $.Output.Nullable, null> + date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + winner: $.Field<'winner', $.Output.Nullable, null> + }> - export type BattleWild = $.Object$2<'BattleWild', { - date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - pokemon: $.Field<'pokemon', $.Output.Nullable, null> - result: $.Field<'result', $.Output.Nullable, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - wildPokemons: $.Field<'wildPokemons', $.Output.Nullable<$.Output.List>, null> - }> + export type BattleWild = $.Object$2<'BattleWild', { + date: $.Field<'date', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + pokemon: $.Field<'pokemon', $.Output.Nullable, null> + result: $.Field<'result', $.Output.Nullable, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + wildPokemons: $.Field<'wildPokemons', $.Output.Nullable<$.Output.List>, null> + }> - export type CombatantMultiPokemon = $.Object$2<'CombatantMultiPokemon', { - pokemons: $.Field<'pokemons', $.Output.Nullable<$.Output.List>, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - }> + export type CombatantMultiPokemon = $.Object$2<'CombatantMultiPokemon', { + pokemons: $.Field<'pokemons', $.Output.Nullable<$.Output.List>, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + }> - export type CombatantSinglePokemon = $.Object$2<'CombatantSinglePokemon', { - pokemon: $.Field<'pokemon', $.Output.Nullable, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - }> + export type CombatantSinglePokemon = $.Object$2<'CombatantSinglePokemon', { + pokemon: $.Field<'pokemon', $.Output.Nullable, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + }> - export type Patron = $.Object$2<'Patron', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - money: $.Field<'money', $.Output.Nullable<$Scalar.Int>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - }> + export type Patron = $.Object$2<'Patron', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + money: $.Field<'money', $.Output.Nullable<$Scalar.Int>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + }> - export type Pokemon = $.Object$2<'Pokemon', { - attack: $.Field<'attack', $.Output.Nullable<$Scalar.Int>, null> - birthday: $.Field<'birthday', $.Output.Nullable<$Scalar.Int>, null> - defense: $.Field<'defense', $.Output.Nullable<$Scalar.Int>, null> - hp: $.Field<'hp', $.Output.Nullable<$Scalar.Int>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - trainer: $.Field<'trainer', $.Output.Nullable, null> - type: $.Field<'type', $.Output.Nullable, null> - }> + export type Pokemon = $.Object$2<'Pokemon', { + attack: $.Field<'attack', $.Output.Nullable<$Scalar.Int>, null> + birthday: $.Field<'birthday', $.Output.Nullable<$Scalar.Int>, null> + defense: $.Field<'defense', $.Output.Nullable<$Scalar.Int>, null> + hp: $.Field<'hp', $.Output.Nullable<$Scalar.Int>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + trainer: $.Field<'trainer', $.Output.Nullable, null> + type: $.Field<'type', $.Output.Nullable, null> + }> - export type Trainer = $.Object$2<'Trainer', { - class: $.Field<'class', $.Output.Nullable, null> - fans: $.Field<'fans', $.Output.Nullable<$.Output.List>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> - pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> - }> - } + export type Trainer = $.Object$2<'Trainer', { + class: $.Field<'class', $.Output.Nullable, null> + fans: $.Field<'fans', $.Output.Nullable<$.Output.List>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + name: $.Field<'name', $.Output.Nullable<$Scalar.String>, null> + pokemon: $.Field<'pokemon', $.Output.Nullable<$.Output.List>, null> + }> // // @@ -255,9 +242,7 @@ export namespace Schema { // // - export namespace Union { - export type Battle = $.Union<'Battle', [Object.BattleRoyale, Object.BattleTrainer, Object.BattleWild]> - } + export type Battle = $.Union<'Battle', [BattleRoyale, BattleTrainer, BattleWild]> } // // @@ -282,44 +267,44 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Mutation', 'Query'] - RootUnion: Schema.Root.Mutation | Schema.Root.Query + RootUnion: Schema.Mutation | Schema.Query Root: { - Query: Schema.Root.Query - Mutation: Schema.Root.Mutation + Query: Schema.Query + Mutation: Schema.Mutation Subscription: null } allTypes: { - Mutation: Schema.Root.Mutation - Query: Schema.Root.Query - BattleWildResult: Schema.Enum.BattleWildResult - PokemonType: Schema.Enum.PokemonType - TrainerClass: Schema.Enum.TrainerClass - BattleRoyale: Schema.Object.BattleRoyale - BattleTrainer: Schema.Object.BattleTrainer - BattleWild: Schema.Object.BattleWild - CombatantMultiPokemon: Schema.Object.CombatantMultiPokemon - CombatantSinglePokemon: Schema.Object.CombatantSinglePokemon - Patron: Schema.Object.Patron - Pokemon: Schema.Object.Pokemon - Trainer: Schema.Object.Trainer - Battle: Schema.Union.Battle - Being: Schema.Interface.Being + Mutation: Schema.Mutation + Query: Schema.Query + BattleWildResult: Schema.BattleWildResult + PokemonType: Schema.PokemonType + TrainerClass: Schema.TrainerClass + BattleRoyale: Schema.BattleRoyale + BattleTrainer: Schema.BattleTrainer + BattleWild: Schema.BattleWild + CombatantMultiPokemon: Schema.CombatantMultiPokemon + CombatantSinglePokemon: Schema.CombatantSinglePokemon + Patron: Schema.Patron + Pokemon: Schema.Pokemon + Trainer: Schema.Trainer + Battle: Schema.Battle + Being: Schema.Being } objects: { - BattleRoyale: Schema.Object.BattleRoyale - BattleTrainer: Schema.Object.BattleTrainer - BattleWild: Schema.Object.BattleWild - CombatantMultiPokemon: Schema.Object.CombatantMultiPokemon - CombatantSinglePokemon: Schema.Object.CombatantSinglePokemon - Patron: Schema.Object.Patron - Pokemon: Schema.Object.Pokemon - Trainer: Schema.Object.Trainer + BattleRoyale: Schema.BattleRoyale + BattleTrainer: Schema.BattleTrainer + BattleWild: Schema.BattleWild + CombatantMultiPokemon: Schema.CombatantMultiPokemon + CombatantSinglePokemon: Schema.CombatantSinglePokemon + Patron: Schema.Patron + Pokemon: Schema.Pokemon + Trainer: Schema.Trainer } unions: { - Battle: Schema.Union.Battle + Battle: Schema.Battle } interfaces: { - Being: Schema.Interface.Being + Being: Schema.Being } customScalars: Utilities.SchemaIndexBase['customScalars'] extensions: Utilities.GlobalRegistry.TypeExtensions From 198b181d232e3e0148d3a55ec12e15bc5dc7b5d6 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Fri, 18 Oct 2024 22:08:13 -0400 Subject: [PATCH 2/3] fix --- src/layers/3_InferResult/__.test-d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layers/3_InferResult/__.test-d.ts b/src/layers/3_InferResult/__.test-d.ts index 6782029bb..1a9666a3e 100644 --- a/src/layers/3_InferResult/__.test-d.ts +++ b/src/layers/3_InferResult/__.test-d.ts @@ -140,6 +140,6 @@ assertEqual<$<{ stringWithArgs: { $: { string: '' } } }>, { stringWithArgs: null // @ts-expect-error invalid query type Result = $<{ id2: true }> // unknown field -assertEqual }>() +assertEqual }>() } From a58f1eaf27f409c746aedbe84162a1d230373c57 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Fri, 18 Oct 2024 22:08:29 -0400 Subject: [PATCH 3/3] snap --- .../__snapshots__/generate.test.ts.snap | 732 +++++++++--------- 1 file changed, 360 insertions(+), 372 deletions(-) diff --git a/src/layers/4_generator/generator/__snapshots__/generate.test.ts.snap b/src/layers/4_generator/generator/__snapshots__/generate.test.ts.snap index ca8eb7f9e..5660edf11 100644 --- a/src/layers/4_generator/generator/__snapshots__/generate.test.ts.snap +++ b/src/layers/4_generator/generator/__snapshots__/generate.test.ts.snap @@ -932,215 +932,213 @@ export namespace Schema { // // - export namespace Root { - export type Mutation = $.Output.ObjectMutation<{ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - }> - - export type Query = $.Output.ObjectQuery<{ - InputObjectNested: $.Field< - 'InputObjectNested', - $.Output.Nullable<$Scalar.ID>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - InputObjectNestedNonNull: $.Field< - 'InputObjectNestedNonNull', - $.Output.Nullable<$Scalar.ID>, - $.Args<{ - input: $.Input.Field - }, false> - > - /** - * Query enum field documentation. - */ - abcEnum: $.Field<'abcEnum', $.Output.Nullable, null> - argInputObjectCircular: $.Field< - 'argInputObjectCircular', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - date: $.Field<'date', $.Output.Nullable<$Scalar.Date>, null> - dateArg: $.Field< - 'dateArg', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - }, true> - > - dateArgInputObject: $.Field< - 'dateArgInputObject', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - dateArgList: $.Field< - 'dateArgList', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.Date>>> - }, true> - > - dateArgNonNull: $.Field< - 'dateArgNonNull', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$Scalar.Date> - }, false> - > - dateArgNonNullList: $.Field< - 'dateArgNonNullList', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.List<$.Input.Nullable<$Scalar.Date>>> - }, false> - > - dateArgNonNullListNonNull: $.Field< - 'dateArgNonNullListNonNull', - $.Output.Nullable<$Scalar.Date>, - $.Args<{ - date: $.Input.Field<$.Input.List<$Scalar.Date>> - }, false> - > - dateInterface1: $.Field<'dateInterface1', $.Output.Nullable, null> - dateList: $.Field<'dateList', $.Output.Nullable<$.Output.List<$Scalar.Date>>, null> - dateListList: $.Field<'dateListList', $.Output.Nullable<$.Output.List<$.Output.List<$Scalar.Date>>>, null> - dateListNonNull: $.Field<'dateListNonNull', $.Output.List<$Scalar.Date>, null> - dateNonNull: $.Field<'dateNonNull', $Scalar.Date, null> - dateObject1: $.Field<'dateObject1', $.Output.Nullable, null> - dateUnion: $.Field<'dateUnion', $.Output.Nullable, null> - error: $.Field< - 'error', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - case: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - idNonNull: $.Field<'idNonNull', $Scalar.ID, null> - interface: $.Field<'interface', $.Output.Nullable, null> - interfaceNonNull: $.Field<'interfaceNonNull', Interface.Interface, null> - interfaceWithArgs: $.Field< - 'interfaceWithArgs', - $.Output.Nullable, - $.Args<{ - id: $.Input.Field<$Scalar.ID> - }, false> - > - listInt: $.Field<'listInt', $.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>, null> - listIntNonNull: $.Field<'listIntNonNull', $.Output.List<$Scalar.Int>, null> - listListInt: $.Field< - 'listListInt', - $.Output.Nullable<$.Output.List<$.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>>>, - null - > - listListIntNonNull: $.Field<'listListIntNonNull', $.Output.List<$.Output.List<$Scalar.Int>>, null> - lowerCaseUnion: $.Field<'lowerCaseUnion', $.Output.Nullable, null> - object: $.Field<'object', $.Output.Nullable, null> - objectList: $.Field<'objectList', $.Output.Nullable<$.Output.List>, null> - objectListNonNull: $.Field<'objectListNonNull', $.Output.List, null> - objectNested: $.Field<'objectNested', $.Output.Nullable, null> - objectNonNull: $.Field<'objectNonNull', Object.Object1, null> - objectWithArgs: $.Field< - 'objectWithArgs', - $.Output.Nullable, - $.Args<{ - boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> - float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - string: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - result: $.Field< - 'result', - $.Output.Nullable, - $.Args<{ - case: $.Input.Field - }, false> - > - resultNonNull: $.Field< - 'resultNonNull', - Union.Result, - $.Args<{ - case: $.Input.Field<$.Input.Nullable> - }, true> - > - string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> - stringWithArgEnum: $.Field< - 'stringWithArgEnum', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ABCEnum: $.Input.Field<$.Input.Nullable> - }, true> - > - stringWithArgInputObject: $.Field< - 'stringWithArgInputObject', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field<$.Input.Nullable> - }, true> - > - stringWithArgInputObjectRequired: $.Field< - 'stringWithArgInputObjectRequired', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - input: $.Input.Field - }, false> - > - /** - * The given arguments are reflected back as a JSON string. - */ - stringWithArgs: $.Field< - 'stringWithArgs', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> - float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> - string: $.Input.Field<$.Input.Nullable<$Scalar.String>> - }, true> - > - stringWithListArg: $.Field< - 'stringWithListArg', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ints: $.Input.Field<$.Input.Nullable<$.Input.List<$.Input.Nullable<$Scalar.Int>>>> - }, true> - > - stringWithListArgRequired: $.Field< - 'stringWithListArgRequired', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - ints: $.Input.Field<$.Input.List<$Scalar.Int>> - }, false> - > - stringWithRequiredArg: $.Field< - 'stringWithRequiredArg', - $.Output.Nullable<$Scalar.String>, - $.Args<{ - string: $.Input.Field<$Scalar.String> - }, false> - > - unionFooBar: $.Field<'unionFooBar', $.Output.Nullable, null> - unionFooBarNonNull: $.Field<'unionFooBarNonNull', Union.FooBarUnion, null> - unionFooBarWithArgs: $.Field< - 'unionFooBarWithArgs', - $.Output.Nullable, - $.Args<{ - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - }, true> - > - unionObject: $.Field<'unionObject', $.Output.Nullable, null> - unionObjectNonNull: $.Field<'unionObjectNonNull', Object.ObjectUnion, null> - }> - } + export type Mutation = $.Output.ObjectMutation<{ + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + }> + + export type Query = $.Output.ObjectQuery<{ + InputObjectNested: $.Field< + 'InputObjectNested', + $.Output.Nullable<$Scalar.ID>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + InputObjectNestedNonNull: $.Field< + 'InputObjectNestedNonNull', + $.Output.Nullable<$Scalar.ID>, + $.Args<{ + input: $.Input.Field + }, false> + > + /** + * Query enum field documentation. + */ + abcEnum: $.Field<'abcEnum', $.Output.Nullable, null> + argInputObjectCircular: $.Field< + 'argInputObjectCircular', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + date: $.Field<'date', $.Output.Nullable<$Scalar.Date>, null> + dateArg: $.Field< + 'dateArg', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + }, true> + > + dateArgInputObject: $.Field< + 'dateArgInputObject', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + dateArgList: $.Field< + 'dateArgList', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.Nullable<$.Input.List<$Scalar.Date>>> + }, true> + > + dateArgNonNull: $.Field< + 'dateArgNonNull', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$Scalar.Date> + }, false> + > + dateArgNonNullList: $.Field< + 'dateArgNonNullList', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.List<$.Input.Nullable<$Scalar.Date>>> + }, false> + > + dateArgNonNullListNonNull: $.Field< + 'dateArgNonNullListNonNull', + $.Output.Nullable<$Scalar.Date>, + $.Args<{ + date: $.Input.Field<$.Input.List<$Scalar.Date>> + }, false> + > + dateInterface1: $.Field<'dateInterface1', $.Output.Nullable, null> + dateList: $.Field<'dateList', $.Output.Nullable<$.Output.List<$Scalar.Date>>, null> + dateListList: $.Field<'dateListList', $.Output.Nullable<$.Output.List<$.Output.List<$Scalar.Date>>>, null> + dateListNonNull: $.Field<'dateListNonNull', $.Output.List<$Scalar.Date>, null> + dateNonNull: $.Field<'dateNonNull', $Scalar.Date, null> + dateObject1: $.Field<'dateObject1', $.Output.Nullable, null> + dateUnion: $.Field<'dateUnion', $.Output.Nullable, null> + error: $.Field< + 'error', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + case: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + idNonNull: $.Field<'idNonNull', $Scalar.ID, null> + interface: $.Field<'interface', $.Output.Nullable, null> + interfaceNonNull: $.Field<'interfaceNonNull', Interface, null> + interfaceWithArgs: $.Field< + 'interfaceWithArgs', + $.Output.Nullable, + $.Args<{ + id: $.Input.Field<$Scalar.ID> + }, false> + > + listInt: $.Field<'listInt', $.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>, null> + listIntNonNull: $.Field<'listIntNonNull', $.Output.List<$Scalar.Int>, null> + listListInt: $.Field< + 'listListInt', + $.Output.Nullable<$.Output.List<$.Output.Nullable<$.Output.List<$.Output.Nullable<$Scalar.Int>>>>>, + null + > + listListIntNonNull: $.Field<'listListIntNonNull', $.Output.List<$.Output.List<$Scalar.Int>>, null> + lowerCaseUnion: $.Field<'lowerCaseUnion', $.Output.Nullable, null> + object: $.Field<'object', $.Output.Nullable, null> + objectList: $.Field<'objectList', $.Output.Nullable<$.Output.List>, null> + objectListNonNull: $.Field<'objectListNonNull', $.Output.List, null> + objectNested: $.Field<'objectNested', $.Output.Nullable, null> + objectNonNull: $.Field<'objectNonNull', Object1, null> + objectWithArgs: $.Field< + 'objectWithArgs', + $.Output.Nullable, + $.Args<{ + boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> + float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + string: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + result: $.Field< + 'result', + $.Output.Nullable, + $.Args<{ + case: $.Input.Field + }, false> + > + resultNonNull: $.Field< + 'resultNonNull', + Result, + $.Args<{ + case: $.Input.Field<$.Input.Nullable> + }, true> + > + string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> + stringWithArgEnum: $.Field< + 'stringWithArgEnum', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ABCEnum: $.Input.Field<$.Input.Nullable> + }, true> + > + stringWithArgInputObject: $.Field< + 'stringWithArgInputObject', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field<$.Input.Nullable> + }, true> + > + stringWithArgInputObjectRequired: $.Field< + 'stringWithArgInputObjectRequired', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + input: $.Input.Field + }, false> + > + /** + * The given arguments are reflected back as a JSON string. + */ + stringWithArgs: $.Field< + 'stringWithArgs', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + boolean: $.Input.Field<$.Input.Nullable<$Scalar.Boolean>> + float: $.Input.Field<$.Input.Nullable<$Scalar.Float>> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + int: $.Input.Field<$.Input.Nullable<$Scalar.Int>> + string: $.Input.Field<$.Input.Nullable<$Scalar.String>> + }, true> + > + stringWithListArg: $.Field< + 'stringWithListArg', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ints: $.Input.Field<$.Input.Nullable<$.Input.List<$.Input.Nullable<$Scalar.Int>>>> + }, true> + > + stringWithListArgRequired: $.Field< + 'stringWithListArgRequired', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + ints: $.Input.Field<$.Input.List<$Scalar.Int>> + }, false> + > + stringWithRequiredArg: $.Field< + 'stringWithRequiredArg', + $.Output.Nullable<$Scalar.String>, + $.Args<{ + string: $.Input.Field<$Scalar.String> + }, false> + > + unionFooBar: $.Field<'unionFooBar', $.Output.Nullable, null> + unionFooBarNonNull: $.Field<'unionFooBarNonNull', FooBarUnion, null> + unionFooBarWithArgs: $.Field< + 'unionFooBarWithArgs', + $.Output.Nullable, + $.Args<{ + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + }, true> + > + unionObject: $.Field<'unionObject', $.Output.Nullable, null> + unionObjectNonNull: $.Field<'unionObjectNonNull', ObjectUnion, null> + }> // // @@ -1158,19 +1156,17 @@ export namespace Schema { // // - export namespace Enum { - /** - * Enum documentation. - * - * Members - * "A" - (DEPRECATED: Enum value A is deprecated.) - * "B" - Enum B member documentation. - * "C" - (DEPRECATED: Enum value C is deprecated.) - */ - export type ABCEnum = $.Enum<'ABCEnum', ['A', 'B', 'C']> + /** + * Enum documentation. + * + * Members + * "A" - (DEPRECATED: Enum value A is deprecated.) + * "B" - Enum B member documentation. + * "C" - (DEPRECATED: Enum value C is deprecated.) + */ + export type ABCEnum = $.Enum<'ABCEnum', ['A', 'B', 'C']> - export type Case = $.Enum<'Case', ['ErrorOne', 'ErrorTwo', 'Object1']> - } + export type Case = $.Enum<'Case', ['ErrorOne', 'ErrorTwo', 'Object1']> // // @@ -1188,27 +1184,25 @@ export namespace Schema { // // - export namespace InputObject { - export type InputObject = $.InputObject<'InputObject', { - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - dateRequired: $.Input.Field<$Scalar.Date> - id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> - idRequired: $.Input.Field<$Scalar.ID> - }, true> - - export type InputObjectCircular = $.InputObject<'InputObjectCircular', { - circular: $.Input.Field<$.Input.Nullable> - date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> - }, true> - - export type InputObjectNested = $.InputObject<'InputObjectNested', { - InputObject: $.Input.Field<$.Input.Nullable> - }, true> - - export type InputObjectNestedNonNull = $.InputObject<'InputObjectNestedNonNull', { - InputObject: $.Input.Field - }, false> - } + export type InputObject = $.InputObject<'InputObject', { + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + dateRequired: $.Input.Field<$Scalar.Date> + id: $.Input.Field<$.Input.Nullable<$Scalar.ID>> + idRequired: $.Input.Field<$Scalar.ID> + }, true> + + export type InputObjectCircular = $.InputObject<'InputObjectCircular', { + circular: $.Input.Field<$.Input.Nullable> + date: $.Input.Field<$.Input.Nullable<$Scalar.Date>> + }, true> + + export type InputObjectNested = $.InputObject<'InputObjectNested', { + InputObject: $.Input.Field<$.Input.Nullable> + }, true> + + export type InputObjectNestedNonNull = $.InputObject<'InputObjectNestedNonNull', { + InputObject: $.Input.Field + }, false> // // @@ -1226,19 +1220,17 @@ export namespace Schema { // // - export namespace Interface { - export type DateInterface1 = $.Interface<'DateInterface1', { - date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> - }, [Object.DateObject1]> + export type DateInterface1 = $.Interface<'DateInterface1', { + date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> + }, [DateObject1]> - export type Error = $.Interface<'Error', { - message: $.Field<'message', $Scalar.String, null> - }, [Object.ErrorOne, Object.ErrorTwo]> + export type Error = $.Interface<'Error', { + message: $.Field<'message', $Scalar.String, null> + }, [ErrorOne, ErrorTwo]> - export type Interface = $.Interface<'Interface', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }, [Object.Object1ImplementingInterface, Object.Object2ImplementingInterface]> - } + export type Interface = $.Interface<'Interface', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }, [Object1ImplementingInterface, Object2ImplementingInterface]> // // @@ -1256,76 +1248,74 @@ export namespace Schema { // // - export namespace Object { - export type Bar = $.Object$2<'Bar', { - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> + export type Bar = $.Object$2<'Bar', { + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> - export type DateObject1 = $.Object$2<'DateObject1', { - date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> - }> + export type DateObject1 = $.Object$2<'DateObject1', { + date1: $.Field<'date1', $.Output.Nullable<$Scalar.Date>, null> + }> - export type DateObject2 = $.Object$2<'DateObject2', { - date2: $.Field<'date2', $.Output.Nullable<$Scalar.Date>, null> - }> + export type DateObject2 = $.Object$2<'DateObject2', { + date2: $.Field<'date2', $.Output.Nullable<$Scalar.Date>, null> + }> - export type ErrorOne = $.Object$2<'ErrorOne', { - infoId: $.Field<'infoId', $.Output.Nullable<$Scalar.ID>, null> - message: $.Field<'message', $Scalar.String, null> - }> + export type ErrorOne = $.Object$2<'ErrorOne', { + infoId: $.Field<'infoId', $.Output.Nullable<$Scalar.ID>, null> + message: $.Field<'message', $Scalar.String, null> + }> - export type ErrorTwo = $.Object$2<'ErrorTwo', { - infoInt: $.Field<'infoInt', $.Output.Nullable<$Scalar.Int>, null> - message: $.Field<'message', $Scalar.String, null> - }> + export type ErrorTwo = $.Object$2<'ErrorTwo', { + infoInt: $.Field<'infoInt', $.Output.Nullable<$Scalar.Int>, null> + message: $.Field<'message', $Scalar.String, null> + }> + /** + * Object documentation. + */ + export type Foo = $.Object$2<'Foo', { /** - * Object documentation. + * Field documentation. + * + * @deprecated Field a is deprecated. */ - export type Foo = $.Object$2<'Foo', { - /** - * Field documentation. - * - * @deprecated Field a is deprecated. - */ - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type Object1 = $.Object$2<'Object1', { - boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> - float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> - }> - - export type Object1ImplementingInterface = $.Object$2<'Object1ImplementingInterface', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> - - export type Object2ImplementingInterface = $.Object$2<'Object2ImplementingInterface', { - boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type ObjectNested = $.Object$2<'ObjectNested', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - object: $.Field<'object', $.Output.Nullable, null> - }> - - export type ObjectUnion = $.Object$2<'ObjectUnion', { - fooBarUnion: $.Field<'fooBarUnion', $.Output.Nullable, null> - }> - - export type lowerCaseObject = $.Object$2<'lowerCaseObject', { - id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> - }> - - export type lowerCaseObject2 = $.Object$2<'lowerCaseObject2', { - int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> - }> - } + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type Object1 = $.Object$2<'Object1', { + boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> + float: $.Field<'float', $.Output.Nullable<$Scalar.Float>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + string: $.Field<'string', $.Output.Nullable<$Scalar.String>, null> + }> + + export type Object1ImplementingInterface = $.Object$2<'Object1ImplementingInterface', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> + + export type Object2ImplementingInterface = $.Object$2<'Object2ImplementingInterface', { + boolean: $.Field<'boolean', $.Output.Nullable<$Scalar.Boolean>, null> + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type ObjectNested = $.Object$2<'ObjectNested', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + object: $.Field<'object', $.Output.Nullable, null> + }> + + export type ObjectUnion = $.Object$2<'ObjectUnion', { + fooBarUnion: $.Field<'fooBarUnion', $.Output.Nullable, null> + }> + + export type lowerCaseObject = $.Object$2<'lowerCaseObject', { + id: $.Field<'id', $.Output.Nullable<$Scalar.ID>, null> + }> + + export type lowerCaseObject2 = $.Object$2<'lowerCaseObject2', { + int: $.Field<'int', $.Output.Nullable<$Scalar.Int>, null> + }> // // @@ -1343,18 +1333,16 @@ export namespace Schema { // // - export namespace Union { - export type DateUnion = $.Union<'DateUnion', [Object.DateObject1, Object.DateObject2]> + export type DateUnion = $.Union<'DateUnion', [DateObject1, DateObject2]> - /** - * Union documentation. - */ - export type FooBarUnion = $.Union<'FooBarUnion', [Object.Bar, Object.Foo]> + /** + * Union documentation. + */ + export type FooBarUnion = $.Union<'FooBarUnion', [Bar, Foo]> - export type Result = $.Union<'Result', [Object.ErrorOne, Object.ErrorTwo, Object.Object1]> + export type Result = $.Union<'Result', [ErrorOne, ErrorTwo, Object1]> - export type lowerCaseUnion = $.Union<'lowerCaseUnion', [Object.lowerCaseObject, Object.lowerCaseObject2]> - } + export type lowerCaseUnion = $.Union<'lowerCaseUnion', [lowerCaseObject, lowerCaseObject2]> } // // @@ -1379,63 +1367,63 @@ import type * as MethodsRoot from './MethodsRoot.js' export interface Schema extends Utilities.SchemaIndexBase { name: Data.Name RootTypesPresent: ['Mutation', 'Query'] - RootUnion: Schema.Root.Mutation | Schema.Root.Query + RootUnion: Schema.Mutation | Schema.Query Root: { - Query: Schema.Root.Query - Mutation: Schema.Root.Mutation + Query: Schema.Query + Mutation: Schema.Mutation Subscription: null } allTypes: { - Mutation: Schema.Root.Mutation - Query: Schema.Root.Query - ABCEnum: Schema.Enum.ABCEnum - Case: Schema.Enum.Case - Bar: Schema.Object.Bar - DateObject1: Schema.Object.DateObject1 - DateObject2: Schema.Object.DateObject2 - ErrorOne: Schema.Object.ErrorOne - ErrorTwo: Schema.Object.ErrorTwo - Foo: Schema.Object.Foo - Object1: Schema.Object.Object1 - Object1ImplementingInterface: Schema.Object.Object1ImplementingInterface - Object2ImplementingInterface: Schema.Object.Object2ImplementingInterface - ObjectNested: Schema.Object.ObjectNested - ObjectUnion: Schema.Object.ObjectUnion - lowerCaseObject: Schema.Object.lowerCaseObject - lowerCaseObject2: Schema.Object.lowerCaseObject2 - DateUnion: Schema.Union.DateUnion - FooBarUnion: Schema.Union.FooBarUnion - Result: Schema.Union.Result - lowerCaseUnion: Schema.Union.lowerCaseUnion - DateInterface1: Schema.Interface.DateInterface1 - Error: Schema.Interface.Error - Interface: Schema.Interface.Interface + Mutation: Schema.Mutation + Query: Schema.Query + ABCEnum: Schema.ABCEnum + Case: Schema.Case + Bar: Schema.Bar + DateObject1: Schema.DateObject1 + DateObject2: Schema.DateObject2 + ErrorOne: Schema.ErrorOne + ErrorTwo: Schema.ErrorTwo + Foo: Schema.Foo + Object1: Schema.Object1 + Object1ImplementingInterface: Schema.Object1ImplementingInterface + Object2ImplementingInterface: Schema.Object2ImplementingInterface + ObjectNested: Schema.ObjectNested + ObjectUnion: Schema.ObjectUnion + lowerCaseObject: Schema.lowerCaseObject + lowerCaseObject2: Schema.lowerCaseObject2 + DateUnion: Schema.DateUnion + FooBarUnion: Schema.FooBarUnion + Result: Schema.Result + lowerCaseUnion: Schema.lowerCaseUnion + DateInterface1: Schema.DateInterface1 + Error: Schema.Error + Interface: Schema.Interface } objects: { - Bar: Schema.Object.Bar - DateObject1: Schema.Object.DateObject1 - DateObject2: Schema.Object.DateObject2 - ErrorOne: Schema.Object.ErrorOne - ErrorTwo: Schema.Object.ErrorTwo - Foo: Schema.Object.Foo - Object1: Schema.Object.Object1 - Object1ImplementingInterface: Schema.Object.Object1ImplementingInterface - Object2ImplementingInterface: Schema.Object.Object2ImplementingInterface - ObjectNested: Schema.Object.ObjectNested - ObjectUnion: Schema.Object.ObjectUnion - lowerCaseObject: Schema.Object.lowerCaseObject - lowerCaseObject2: Schema.Object.lowerCaseObject2 + Bar: Schema.Bar + DateObject1: Schema.DateObject1 + DateObject2: Schema.DateObject2 + ErrorOne: Schema.ErrorOne + ErrorTwo: Schema.ErrorTwo + Foo: Schema.Foo + Object1: Schema.Object1 + Object1ImplementingInterface: Schema.Object1ImplementingInterface + Object2ImplementingInterface: Schema.Object2ImplementingInterface + ObjectNested: Schema.ObjectNested + ObjectUnion: Schema.ObjectUnion + lowerCaseObject: Schema.lowerCaseObject + lowerCaseObject2: Schema.lowerCaseObject2 } unions: { - DateUnion: Schema.Union.DateUnion - FooBarUnion: Schema.Union.FooBarUnion - Result: Schema.Union.Result - lowerCaseUnion: Schema.Union.lowerCaseUnion + DateUnion: Schema.DateUnion + FooBarUnion: Schema.FooBarUnion + Result: Schema.Result + lowerCaseUnion: Schema.lowerCaseUnion } interfaces: { - DateInterface1: Schema.Interface.DateInterface1 - Error: Schema.Interface.Error - Interface: Schema.Interface.Interface + DateInterface1: Schema.DateInterface1 + Error: Schema.Error + Interface: Schema.Interface } customScalars: Utilities.SchemaIndexBase['customScalars'] extensions: Utilities.GlobalRegistry.TypeExtensions