@@ -40,6 +40,8 @@ test(`general`, () => {
4040 expectTypeOf < RS < { object : { id : true } } > > ( ) . toEqualTypeOf < { object : null | { id : string | null } } > ( )
4141 // non-nullable
4242 expectTypeOf < RS < { objectNonNull : { id : true } } > > ( ) . toEqualTypeOf < { objectNonNull : { id : string | null } } > ( )
43+ // with args
44+ expectTypeOf < RS < { objectWithArgs : { $ : { id : 'abc' } ; id : true } } > > ( ) . toEqualTypeOf < { objectWithArgs : null | { id : string | null } } > ( )
4345
4446 // scalars-wildcard
4547 expectTypeOf < RS < { objectNonNull : { $scalars : true } } > > ( ) . toEqualTypeOf < { objectNonNull : { __typename : "Object1" ; string : null | string ; int : null | number ; float : null | number ; boolean : null | boolean ; id : null | string } } > ( )
@@ -53,6 +55,9 @@ test(`general`, () => {
5355 expectTypeOf < RS < { fooBarUnion : { onFoo : { __typename : true } } } > > ( ) . toEqualTypeOf < { fooBarUnion : null | { } | { __typename : "Foo" } } > ( )
5456 expectTypeOf < RS < { fooBarUnion : { onFoo : { id : true } } } > > ( ) . toEqualTypeOf < { fooBarUnion : null | { } | { id : null | string } } > ( )
5557 expectTypeOf < RS < { fooBarUnion : { __typename : true ; onFoo : { id : true } } } > > ( ) . toEqualTypeOf < { fooBarUnion : null | { __typename : "Bar" } | { __typename : "Foo" ; id : null | string } } > ( )
58+ // with Args
59+ expectTypeOf < RS < { unionFooBarWithArgs : { $ : { id : `abc` } , onFoo : { id : true } } } > > ( ) . toEqualTypeOf < { unionFooBarWithArgs : null | { } | { id : null | string } } > ( )
60+
5661
5762 // Union fragments Case
5863 expectTypeOf < RS < { lowerCaseUnion : { __typename :true , onLowerCaseObject : { id : true } , onLowerCaseObject2 : { int : true } } } > > ( ) . toEqualTypeOf < { lowerCaseUnion : null | { __typename : 'lowerCaseObject' ; id : null | string } | { __typename : 'lowerCaseObject2' ; int : null | number } } > ( )
@@ -67,6 +72,8 @@ test(`general`, () => {
6772 expectTypeOf < RS < { interface : { __typename :true } } > > ( ) . toEqualTypeOf < { interface : null | { __typename : 'Object1ImplementingInterface' } | { __typename : 'Object2ImplementingInterface' } } > ( )
6873 expectTypeOf < RS < { interface : { onObject1ImplementingInterface : { __typename : true } } } > > ( ) . toEqualTypeOf < { interface : null | { __typename : 'Object1ImplementingInterface' } | { } } > ( )
6974 expectTypeOf < RS < { interface : { $scalars : true } } > > ( ) . toEqualTypeOf < { interface : null | { __typename : 'Object1ImplementingInterface' , id : null | string , int : null | number } | { __typename : 'Object2ImplementingInterface' , id : null | string ; boolean :null | boolean } } > ( )
75+ // with args
76+ expectTypeOf < RS < { interfaceWithArgs : { $ :{ id :'abc' } ; id : true } } > > ( ) . toEqualTypeOf < { interfaceWithArgs : null | { id : null | string } } > ( )
7077
7178 // Alias
7279 // scalar
0 commit comments