@@ -64,7 +64,43 @@ fragment ConcreateTypes on Viewer {
6464}
6565
6666~~~~~~~~~~ OUTPUT ~~~~~~~~~~
67- TODO
67+ import { FragmentReference } from "relay-runtime";
68+ export enum FragmentSpread_ref {
69+ }
70+ export type FragmentSpread = {
71+ readonly id : string ;
72+ readonly justFrag : ({
73+ readonly " $fragments" : PictureFragment_ref ;
74+ }) | null ;
75+ readonly fragAndField : ({
76+ readonly uri: string | null ;
77+ readonly " $fragments" : PictureFragment_ref ;
78+ }) | null ;
79+ readonly " $fragments" : OtherFragment_ref & UserFrag1_ref & UserFrag2_ref ;
80+ readonly " $refType" : FragmentSpread_ref ;
81+ } ;
82+
83+
84+ import { FragmentReference } from "relay-runtime";
85+ export enum ConcreateTypes_ref {
86+ }
87+ export type ConcreateTypes = {
88+ readonly actor : ({
89+ readonly __typename: " Page" ;
90+ readonly id : string ;
91+ readonly " $fragments" : PageFragment_ref ;
92+ } | {
93+ readonly __typename: " User" ;
94+ readonly name : string | null ;
95+ } | {
96+ /* This will never be '% other', but we need some
97+ value in case none of the concrete values match.*/
98+ readonly __typename: " %other" ;
99+ }) | null ;
100+ readonly " $refType" : ConcreateTypes_ref ;
101+ } ;
102+
103+ ` ;
68104
69105exports [` TypeScriptGenerator matches expected output: inline-fragment.graphql 1` ] = `
70106~~~~~~~~~~ INPUT ~~~~~~~~~~
@@ -130,7 +166,63 @@ fragment InlineFragmentKitchenSink on Story {
130166}
131167
132168~~~~~~~~~~ OUTPUT ~~~~~~~~~~
133- TODO
169+ import { FragmentReference } from "relay-runtime";
170+ export enum InlineFragment_ref {
171+ }
172+ export type InlineFragment = {
173+ readonly id : string ;
174+ readonly name ?: string | null ;
175+ readonly message ?: ({
176+ readonly text: string | null ;
177+ }) | null ;
178+ readonly " $refType" : InlineFragment_ref ;
179+ } ;
180+
181+
182+ import { FragmentReference } from "relay-runtime";
183+ export enum InlineFragmentWithOverlappingFields_ref {
184+ }
185+ export type InlineFragmentWithOverlappingFields = {
186+ readonly hometown ?: ({
187+ readonly id: string ;
188+ readonly name : string | null ;
189+ readonly message ?: ({
190+ readonly text: string | null ;
191+ }) | null ;
192+ }) | null ;
193+ readonly name ?: string | null ;
194+ readonly " $refType" : InlineFragmentWithOverlappingFields_ref ;
195+ } ;
196+
197+
198+ import { FragmentReference } from "relay-runtime";
199+ export enum InlineFragmentConditionalID_ref {
200+ }
201+ export type InlineFragmentConditionalID = {
202+ readonly id ?: string ;
203+ readonly name ?: string | null ;
204+ readonly " $refType" : InlineFragmentConditionalID_ref ;
205+ } ;
206+
207+
208+ import { FragmentReference } from "relay-runtime";
209+ export enum InlineFragmentKitchenSink_ref {
210+ }
211+ export type InlineFragmentKitchenSink = {
212+ readonly actor : ({
213+ readonly id: string ;
214+ readonly profilePicture : ({
215+ readonly uri: string | null ;
216+ readonly width ?: number | null ;
217+ readonly height ?: number | null ;
218+ }) | null ;
219+ readonly name ?: string | null ;
220+ readonly " $fragments" : SomeFragment_ref ;
221+ }) | null ;
222+ readonly " $refType" : InlineFragmentKitchenSink_ref ;
223+ } ;
224+
225+ ` ;
134226
135227exports [` TypeScriptGenerator matches expected output: linked-field.graphql 1` ] = `
136228~~~~~~~~~~ INPUT ~~~~~~~~~~
@@ -583,4 +675,47 @@ fragment AnotherRecursiveFragment on Image {
583675}
584676
585677~~~~~~~~~~ OUTPUT ~~~~~~~~~~
586- TODO
678+ import { FragmentReference } from "relay-runtime";
679+ export enum UserProfile_ref {
680+ }
681+ export type UserProfile = {
682+ readonly profilePicture : ({
683+ readonly uri: string | null ;
684+ readonly width : number | null ;
685+ readonly height : number | null ;
686+ readonly " $fragments" : PhotoFragment_ref ;
687+ }) | null ;
688+ readonly " $refType" : UserProfile_ref ;
689+ } ;
690+
691+
692+ import { FragmentReference } from "relay-runtime";
693+ export enum PhotoFragment_ref {
694+ }
695+ export type PhotoFragment = {
696+ readonly uri : string | null ;
697+ readonly width : number | null ;
698+ readonly " $refType" : PhotoFragment_ref ;
699+ } ;
700+
701+
702+ import { FragmentReference } from "relay-runtime";
703+ export enum RecursiveFragment_ref {
704+ }
705+ export type RecursiveFragment = {
706+ readonly uri : string | null ;
707+ readonly width : number | null ;
708+ readonly " $refType" : RecursiveFragment_ref ;
709+ } ;
710+
711+
712+ import { FragmentReference } from "relay-runtime";
713+ export enum AnotherRecursiveFragment_ref {
714+ }
715+ export type AnotherRecursiveFragment = {
716+ readonly uri : string | null ;
717+ readonly height : number | null ;
718+ readonly " $refType" : AnotherRecursiveFragment_ref ;
719+ } ;
720+
721+ `;
0 commit comments