From b49457b5f29328d2dc23c642788a2e697cb8966e Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Wed, 15 May 2024 19:24:47 +1000 Subject: [PATCH] [typescript-resolvers] Fix interfaces not handling nested correctly (#9962) * Fix nested resolvers returning interfaces not being overridden with resolvers type correctly * Fix failing tests in ts-resolvers * Fix failing tests in ts-resolvers mappings * Add changeset --- .changeset/weak-kings-clap.md | 6 + .../src/base-resolvers-visitor.ts | 3 +- .../__snapshots__/ts-resolvers.spec.ts.snap | 42 ++--- .../resolvers/tests/mapping.spec.ts | 156 +++++++++--------- .../resolvers/tests/ts-resolvers.spec.ts | 64 +++---- 5 files changed, 139 insertions(+), 132 deletions(-) create mode 100644 .changeset/weak-kings-clap.md diff --git a/.changeset/weak-kings-clap.md b/.changeset/weak-kings-clap.md new file mode 100644 index 00000000000..0015472c508 --- /dev/null +++ b/.changeset/weak-kings-clap.md @@ -0,0 +1,6 @@ +--- +'@graphql-codegen/visitor-plugin-common': patch +'@graphql-codegen/typescript-resolvers': patch +--- + +Fix interface mappers not working in nested/self-referencing scenarios diff --git a/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts b/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts index 5ace0b3de5d..3774a953dfd 100644 --- a/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts +++ b/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts @@ -1754,8 +1754,9 @@ export class BaseResolversVisitor< const field = fields[fieldName]; const baseType = getBaseType(field.type); const isUnion = isUnionType(baseType); + const isInterface = isInterfaceType(baseType); - if (!this.config.mappers[baseType.name] && !isUnion && !this._shouldMapType[baseType.name]) { + if (!this.config.mappers[baseType.name] && !isUnion && !isInterface && !this._shouldMapType[baseType.name]) { return null; } diff --git a/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap b/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap index bb357dc74ef..2f7da265854 100644 --- a/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap +++ b/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap @@ -175,9 +175,9 @@ export type ResolversUnionTypes<_RefType extends Record> = Reso /** Mapping of interface types */ export type ResolversInterfaceTypes<_RefType extends Record> = ResolversObject<{ Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }>; /** Mapping between all available schema types and the resolvers types */ @@ -195,8 +195,8 @@ export type ResolversTypes = ResolversObject<{ AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -218,8 +218,8 @@ export type ResolversParentTypes = ResolversObject<{ AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -434,9 +434,9 @@ export type ResolversUnionTypes<_RefType extends Record> = Reso /** Mapping of interface types */ export type ResolversInterfaceTypes<_RefType extends Record> = ResolversObject<{ Node: ( Types.SomeNode ); - AnotherNode: ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, interfaceChild?: Types.Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Types.Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, interfaceChild?: Types.Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Types.Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Types.Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Types.Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }>; /** Mapping between all available schema types and the resolvers types */ @@ -454,8 +454,8 @@ export type ResolversTypes = ResolversObject<{ AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Types.Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Types.Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Types.Maybe, interfaceChild?: Types.Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Types.Maybe, unionChildren: Array, interfaceChild?: Types.Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -477,8 +477,8 @@ export type ResolversParentTypes = ResolversObject<{ AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Types.Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Types.Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Types.Maybe, interfaceChild?: Types.Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Types.Maybe, unionChildren: Array, interfaceChild?: Types.Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Types.Scalars['MyScalar']['output']; Int: Types.Scalars['Int']['output']; @@ -779,9 +779,9 @@ export type ResolversUnionTypes<_RefType extends Record> = Reso /** Mapping of interface types */ export type ResolversInterfaceTypes<_RefType extends Record> = ResolversObject<{ Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }>; /** Mapping between all available schema types and the resolvers types */ @@ -799,8 +799,8 @@ export type ResolversTypes = ResolversObject<{ AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -822,8 +822,8 @@ export type ResolversParentTypes = ResolversObject<{ AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; diff --git a/packages/plugins/typescript/resolvers/tests/mapping.spec.ts b/packages/plugins/typescript/resolvers/tests/mapping.spec.ts index 67b46f4717d..e96260f2479 100644 --- a/packages/plugins/typescript/resolvers/tests/mapping.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/mapping.spec.ts @@ -16,9 +16,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -36,8 +36,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -59,8 +59,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -92,9 +92,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -113,7 +113,7 @@ describe('ResolversTypes', () => { WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; AnotherNodeWithChild: ResolverTypeWrapper; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -136,7 +136,7 @@ describe('ResolversTypes', () => { WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; AnotherNodeWithChild: AnotherNodeWithChildMapper; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -399,9 +399,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( Partial ); - AnotherNode: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); - WithChild: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); - WithChildren: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); + AnotherNode: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); + WithChild: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); + WithChildren: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -419,8 +419,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>>; MyUnion: Partial['MyUnion']>>; MyScalar: ResolverTypeWrapper>; Int: ResolverTypeWrapper>; @@ -441,8 +441,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Partial & { unionChild?: Maybe }>; - AnotherNodeWithAll: Partial & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: Partial & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: Partial & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: Partial['MyUnion']>; MyScalar: Partial; Int: Partial; @@ -472,9 +472,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( CustomPartial ); - AnotherNode: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); - WithChild: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); - WithChildren: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); + AnotherNode: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); + WithChild: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); + WithChildren: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -492,8 +492,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>>; MyUnion: CustomPartial['MyUnion']>>; MyScalar: ResolverTypeWrapper>; Int: ResolverTypeWrapper>; @@ -514,8 +514,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: CustomPartial & { unionChild?: Maybe }>; - AnotherNodeWithAll: CustomPartial & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: CustomPartial & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: CustomPartial & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: CustomPartial['MyUnion']>; MyScalar: CustomPartial; Int: CustomPartial; @@ -548,9 +548,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( CustomPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -568,8 +568,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -590,8 +590,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: CustomPartial & { unionChild?: Maybe }>; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: CustomPartial & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -700,9 +700,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -721,7 +721,7 @@ describe('ResolversTypes', () => { WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; AnotherNodeWithChild: ResolverTypeWrapper; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -743,7 +743,7 @@ describe('ResolversTypes', () => { WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; AnotherNodeWithChild: AnotherNodeWithChildMapper; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -1077,9 +1077,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( ExtraPartial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( ExtraPartial & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( ExtraPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( ExtraPartial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -1097,8 +1097,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -1121,8 +1121,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: ExtraPartial & { unionChild?: Maybe }>; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: ExtraPartial & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -1616,9 +1616,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -1636,8 +1636,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -1658,8 +1658,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -1692,9 +1692,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -1712,8 +1712,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -1734,8 +1734,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -1770,9 +1770,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( InterfaceNamespace.AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( InterfaceNamespace.AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( InterfaceNamespace.AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( InterfaceNamespace.AnotherNodeWithChildMapper ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -1791,7 +1791,7 @@ describe('ResolversTypes', () => { WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; AnotherNodeWithChild: ResolverTypeWrapper; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -1815,7 +1815,7 @@ describe('ResolversTypes', () => { WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; AnotherNodeWithChild: InterfaceNamespace.AnotherNodeWithChildMapper; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -1926,9 +1926,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -1946,8 +1946,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -1970,8 +1970,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -2004,9 +2004,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( MyNamespace.MyDefaultMapper ); - AnotherNode: ( InterfaceNamespace.MyInterface & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( MyNamespace.MyDefaultMapper & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); - WithChild: ( InterfaceNamespace.MyInterface & { unionChild?: Maybe<_RefType['ChildUnion']> }> ) | ( MyNamespace.MyDefaultMapper & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); - WithChildren: ( MyNamespace.MyDefaultMapper & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> ); + AnotherNode: ( InterfaceNamespace.MyInterface & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( MyNamespace.MyDefaultMapper & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); + WithChild: ( InterfaceNamespace.MyInterface & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> ) | ( MyNamespace.MyDefaultMapper & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); + WithChildren: ( MyNamespace.MyDefaultMapper & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> ); }; `); expect(result.content).toBeSimilarStringTo(` @@ -2024,8 +2024,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>>; MyUnion: MyNamespace.MyDefaultMapper['MyUnion']>>; MyScalar: ResolverTypeWrapper>; Int: ResolverTypeWrapper>; @@ -2047,8 +2047,8 @@ describe('ResolversTypes', () => { AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: InterfaceNamespace.MyInterface & { unionChild?: Maybe }>; - AnotherNodeWithAll: MyNamespace.MyDefaultMapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: InterfaceNamespace.MyInterface & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: MyNamespace.MyDefaultMapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: MyNamespace.MyDefaultMapper['MyUnion']>; MyScalar: MyNamespace.MyDefaultMapper; Int: MyNamespace.MyDefaultMapper; diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts index 73a1b71ccd8..9cb97e5fd33 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts @@ -242,9 +242,9 @@ export type MyTypeResolvers> = { Node: ( SomeNode & { __typename: 'SomeNode' } ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); }; `); }); @@ -348,9 +348,9 @@ export type MyTypeResolvers> = { Node: ( SomeNode & { __typename: 'SomeNode' } ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); }; `); }); @@ -369,9 +369,9 @@ export type MyTypeResolvers> = { Node: ( SomeNode & { __typename: 'SomeNode' } ); - AnotherNode: ( AnotherNodeWithChildMapper & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChild: ( AnotherNodeWithChildMapper & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); + AnotherNode: ( AnotherNodeWithChildMapper & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChild: ( AnotherNodeWithChildMapper & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); }; `); }); @@ -390,9 +390,9 @@ export type MyTypeResolvers> = { Node: ( SomeNode & { __typename: 'SomeNode' } ); - AnotherNode: ( Wrapper & { unionChild?: Maybe<_RefType['ChildUnion']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChild: ( Wrapper & { unionChild?: Maybe<_RefType['ChildUnion']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); + AnotherNode: ( Wrapper & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChild: ( Wrapper & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); }; `); }); @@ -411,9 +411,9 @@ export type MyTypeResolvers> = { Node: ( Partial & { __typename: 'SomeNode' } ); - AnotherNode: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> & { __typename: 'AnotherNodeWithAll' } ); - WithChild: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> & { __typename: 'AnotherNodeWithAll' } ); - WithChildren: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> }> & { __typename: 'AnotherNodeWithAll' } ); + AnotherNode: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> & { __typename: 'AnotherNodeWithAll' } ); + WithChild: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> }> & { __typename: 'AnotherNodeWithChild' } ) | ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> & { __typename: 'AnotherNodeWithAll' } ); + WithChildren: ( Partial & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> }> & { __typename: 'AnotherNodeWithAll' } ); }; `); }); @@ -456,9 +456,9 @@ export type MyTypeResolvers> = { Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } & { __typename: 'AnotherNodeWithAll' } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } & { __typename: 'AnotherNodeWithChild' } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } & { __typename: 'AnotherNodeWithAll' } ); }; `); }); @@ -2094,9 +2094,9 @@ export type ResolverFn = ( expect(content.content).toBeSimilarStringTo(` export type ResolversInterfaceTypes<_RefType extends Record> = { Node: ( SomeNode ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); @@ -2115,8 +2115,8 @@ export type ResolverFn = ( AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -2139,8 +2139,8 @@ export type ResolverFn = ( AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; WithChildren: ResolversInterfaceTypes['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output']; @@ -2160,9 +2160,9 @@ export type ResolverFn = ( expect(content.content).toBeSimilarStringTo(` export type I_ResolversInterfaceTypes_Types<_RefType extends Record> = { Node: ( I_SomeNode_Types ); - AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); - WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']> } ); + AnotherNode: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChild: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']> } ) | ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); + WithChildren: ( Omit & { unionChild?: Maybe<_RefType['ChildUnion']>, unionChildren: Array<_RefType['ChildUnion']>, interfaceChild?: Maybe<_RefType['Node']>, interfaceChildren: Array<_RefType['Node']> } ); }; `); @@ -2181,8 +2181,8 @@ export type ResolverFn = ( AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; WithChildren: ResolverTypeWrapper['WithChildren']>; - AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; - AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; + AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe, interfaceChild?: Maybe }>; + AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; MyScalar: ResolverTypeWrapper; Int: ResolverTypeWrapper; @@ -2205,8 +2205,8 @@ export type ResolverFn = ( AnotherNode: I_ResolversInterfaceTypes_Types['AnotherNode']; WithChild: I_ResolversInterfaceTypes_Types['WithChild']; WithChildren: I_ResolversInterfaceTypes_Types['WithChildren']; - AnotherNodeWithChild: Omit & { unionChild?: Maybe }; - AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; + AnotherNodeWithChild: Omit & { unionChild?: Maybe, interfaceChild?: Maybe }; + AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array, interfaceChild?: Maybe, interfaceChildren: Array }; MyUnion: I_ResolversUnionTypes_Types['MyUnion']; MyScalar: Scalars['MyScalar']['output']; Int: Scalars['Int']['output'];