Skip to content

Commit

Permalink
update snap
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Apr 18, 2024
1 parent 9309c52 commit 2a52b6d
Showing 1 changed file with 75 additions and 2 deletions.
77 changes: 75 additions & 2 deletions src/generator/__snapshots__/files.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,17 @@ export namespace Root {
dateObject1: $.Field<$.Output.Nullable<Object.DateObject1>, null>
id: $.Field<$.Output.Nullable<$Scalar.ID>, null>
idNonNull: $.Field<$Scalar.ID, null>
interface: $.Field<$.Output.Nullable<Interface.Interface>, null>
objectWithArgs: $.Field<
$.Output.Nullable<Object.Object1>,
$.Args<{
boolean: $.Input.Nullable<$Scalar.Boolean>
float: $.Input.Nullable<$Scalar.Float>
id: $.Input.Nullable<$Scalar.ID>
int: $.Input.Nullable<$Scalar.Int>
string: $.Input.Nullable<$Scalar.String>
}>
>
unionFooBar: $.Field<$.Output.Nullable<Union.FooBarUnion>, null>
}>
}
Expand All @@ -572,7 +583,9 @@ export namespace InputObject {
// ------------------------------------------------------------ //
export namespace Interface {
// -- no types --
export type Interface = $.Interface<'Interface', {
id: $.Field<$.Output.Nullable<$Scalar.ID>, null>
}, [Object.Object1ImplementingInterface, Object.Object2ImplementingInterface]>
}
// ------------------------------------------------------------ //
Expand All @@ -599,6 +612,24 @@ export namespace Object {
*/
id: $.Field<$.Output.Nullable<$Scalar.ID>, null>
}>
export type Object1 = $.Object$2<'Object1', {
boolean: $.Field<$.Output.Nullable<$Scalar.Boolean>, null>
float: $.Field<$.Output.Nullable<$Scalar.Float>, null>
id: $.Field<$.Output.Nullable<$Scalar.ID>, null>
int: $.Field<$.Output.Nullable<$Scalar.Int>, null>
string: $.Field<$.Output.Nullable<$Scalar.String>, null>
}>
export type Object1ImplementingInterface = $.Object$2<'Object1ImplementingInterface', {
id: $.Field<$.Output.Nullable<$Scalar.ID>, null>
int: $.Field<$.Output.Nullable<$Scalar.Int>, null>
}>
export type Object2ImplementingInterface = $.Object$2<'Object2ImplementingInterface', {
boolean: $.Field<$.Output.Nullable<$Scalar.Boolean>, null>
id: $.Field<$.Output.Nullable<$Scalar.ID>, null>
}>
}
// ------------------------------------------------------------ //
Expand Down Expand Up @@ -649,9 +680,35 @@ export const Foo = $.Object$(\`Foo\`, {
id: $.field($.Output.Nullable($Scalar.ID)),
})
// @ts-ignore - circular types cannot infer. Ignore in case there are any. This comment is always added, it does not indicate if this particular type could infer or not.
export const Object1 = $.Object$(\`Object1\`, {
boolean: $.field($.Output.Nullable($Scalar.Boolean)),
float: $.field($.Output.Nullable($Scalar.Float)),
id: $.field($.Output.Nullable($Scalar.ID)),
int: $.field($.Output.Nullable($Scalar.Int)),
string: $.field($.Output.Nullable($Scalar.String)),
})
// @ts-ignore - circular types cannot infer. Ignore in case there are any. This comment is always added, it does not indicate if this particular type could infer or not.
export const Object1ImplementingInterface = $.Object$(\`Object1ImplementingInterface\`, {
id: $.field($.Output.Nullable($Scalar.ID)),
int: $.field($.Output.Nullable($Scalar.Int)),
})
// @ts-ignore - circular types cannot infer. Ignore in case there are any. This comment is always added, it does not indicate if this particular type could infer or not.
export const Object2ImplementingInterface = $.Object$(\`Object2ImplementingInterface\`, {
boolean: $.field($.Output.Nullable($Scalar.Boolean)),
id: $.field($.Output.Nullable($Scalar.ID)),
})
// @ts-ignore - circular types cannot infer. Ignore in case there are any. This comment is always added, it does not indicate if this particular type could infer or not.
export const FooBarUnion = $.Union(\`FooBarUnion\`, [Bar, Foo])
export const Interface = $.Interface(\`Interface\`, { id: $.field($.Output.Nullable($Scalar.ID)) }, [
Object1ImplementingInterface,
Object2ImplementingInterface,
])
// @ts-ignore - circular types cannot infer. Ignore in case there are any. This comment is always added, it does not indicate if this particular type could infer or not.
export const Mutation = $.Object$(\`Mutation\`, {
id: $.field($.Output.Nullable($Scalar.ID)),
Expand All @@ -667,6 +724,17 @@ export const Query = $.Object$(\`Query\`, {
dateObject1: $.field($.Output.Nullable(() => DateObject1)),
id: $.field($.Output.Nullable($Scalar.ID)),
idNonNull: $.field($Scalar.ID),
interface: $.field($.Output.Nullable(() => Interface)),
objectWithArgs: $.field(
$.Output.Nullable(() => Object1),
$.Args({
boolean: $.Input.Nullable($Scalar.Boolean),
float: $.Input.Nullable($Scalar.Float),
id: $.Input.Nullable($Scalar.ID),
int: $.Input.Nullable($Scalar.Int),
string: $.Input.Nullable($Scalar.String),
}),
),
unionFooBar: $.field($.Output.Nullable(() => FooBarUnion)),
})
Expand All @@ -680,11 +748,16 @@ export const $Index = {
Bar,
DateObject1,
Foo,
Object1,
Object1ImplementingInterface,
Object2ImplementingInterface,
},
unions: {
FooBarUnion,
},
interfaces: {},
interfaces: {
Interface,
},
}
"
`;

0 comments on commit 2a52b6d

Please sign in to comment.