@@ -811,17 +811,33 @@ fragment TypenameInsideWithOverlappingFieldsFull on Viewer {
811
811
}
812
812
813
813
~~~~~~~~~~ OUTPUT ~~~~~~~~~~
814
- THROWN EXCEPTION:
815
-
816
- Error: RelayParser: Encountered 1 error(s):
817
- - Unknown type: 'ExtraUser'.
818
-
819
- GraphQL request (15:12)
820
- 14: }
821
- 15: ... on ExtraUser {
822
- ^
823
- 16 : id
824
-
814
+ declare const _TypenameInsideWithOverlappingFieldsFull$ref: unique symbol;
815
+ export type TypenameInsideWithOverlappingFieldsFull$ref = typeof _TypenameInsideWithOverlappingFieldsFull$ref;
816
+ export type TypenameInsideWithOverlappingFieldsFull = {
817
+ readonly actor : ({
818
+ readonly __typename: string ;
819
+ readonly id ?: string ;
820
+ readonly name ?: string | null ;
821
+ readonly profile_picture ?: {
822
+ readonly uri: string | null ;
823
+ } | null ;
824
+ } & ({
825
+ readonly __typename: " Page" ;
826
+ readonly id : string ;
827
+ readonly name : string | null ;
828
+ } | {
829
+ readonly __typename: " User" ;
830
+ readonly profile_picture : {
831
+ readonly uri: string | null ;
832
+ } | null ;
833
+ } | {
834
+ /* This will never be '% other', but we need some
835
+ value in case none of the concrete values match.*/
836
+ readonly __typename: " %other" ;
837
+ })) | null ;
838
+ readonly " $refType" : TypenameInsideWithOverlappingFieldsFull$ref ;
839
+ } ;
840
+
825
841
`;
826
842
827
843
exports[`TypeScriptGenerator with a single artifact directory matches expected output: typename-on-union.graphql 1`] = `
@@ -1928,17 +1944,32 @@ fragment TypenameInsideWithOverlappingFieldsFull on Viewer {
1928
1944
}
1929
1945
1930
1946
~~~~~~~~~~ OUTPUT ~~~~~~~~~~
1931
- THROWN EXCEPTION:
1932
-
1933
- Error: RelayParser: Encountered 1 error(s):
1934
- - Unknown type: 'ExtraUser'.
1935
-
1936
- GraphQL request (15:12)
1937
- 14: }
1938
- 15: ... on ExtraUser {
1939
- ^
1940
- 16 : id
1941
-
1947
+ export type TypenameInsideWithOverlappingFieldsFull$ref = any;
1948
+ export type TypenameInsideWithOverlappingFieldsFull = {
1949
+ readonly actor : ({
1950
+ readonly __typename: string ;
1951
+ readonly id ?: string ;
1952
+ readonly name ?: string | null ;
1953
+ readonly profile_picture ?: {
1954
+ readonly uri: string | null ;
1955
+ } | null ;
1956
+ } & ({
1957
+ readonly __typename: " Page" ;
1958
+ readonly id : string ;
1959
+ readonly name : string | null ;
1960
+ } | {
1961
+ readonly __typename: " User" ;
1962
+ readonly profile_picture : {
1963
+ readonly uri: string | null ;
1964
+ } | null ;
1965
+ } | {
1966
+ /* This will never be '% other', but we need some
1967
+ value in case none of the concrete values match.*/
1968
+ readonly __typename: " %other" ;
1969
+ })) | null ;
1970
+ readonly " $refType" : TypenameInsideWithOverlappingFieldsFull$ref ;
1971
+ } ;
1972
+
1942
1973
`;
1943
1974
1944
1975
exports[`TypeScriptGenerator without a single artifact directory matches expected output: typename-on-union.graphql 1`] = `
0 commit comments