@@ -57,7 +57,7 @@ impl<State> Display for FetchStepData<State> {
5757 write ! ( f, "{}/{} " , def_name, selections) ?;
5858 }
5959
60- write ! ( f, " at $.{}" , self . response_path. join( "." ) ) ;
60+ write ! ( f, " at $.{}" , self . response_path. join( "." ) ) ? ;
6161
6262 if self . used_for_requires {
6363 write ! ( f, " [@requires]" ) ?;
@@ -106,31 +106,13 @@ impl<State> FetchStepData<State> {
106106 }
107107}
108108
109- impl FetchStepData < SingleTypeFetchStep > {
110- pub fn into_multi_type ( self ) -> FetchStepData < MultiTypeFetchStep > {
111- FetchStepData :: < MultiTypeFetchStep > {
112- service_name : self . service_name ,
113- response_path : self . response_path ,
114- input : self . input ,
115- output_new : self . output_new . into_multi_type ( ) ,
116- kind : self . kind ,
117- used_for_requires : self . used_for_requires ,
118- condition : self . condition ,
119- variable_usages : self . variable_usages ,
120- variable_definitions : self . variable_definitions ,
121- mutation_field_position : self . mutation_field_position ,
122- input_rewrites : self . input_rewrites ,
123- output_rewrites : self . output_rewrites ,
124- internal_aliases_locations : self . internal_aliases_locations ,
125- }
126- }
127-
109+ impl FetchStepData < MultiTypeFetchStep > {
128110 pub fn can_merge (
129111 & self ,
130112 self_index : NodeIndex ,
131113 other_index : NodeIndex ,
132114 other : & Self ,
133- fetch_graph : & FetchGraph < SingleTypeFetchStep > ,
115+ fetch_graph : & FetchGraph < MultiTypeFetchStep > ,
134116 ) -> bool {
135117 if self_index == other_index {
136118 return false ;
@@ -191,3 +173,23 @@ impl FetchStepData<SingleTypeFetchStep> {
191173 true
192174 }
193175}
176+
177+ impl FetchStepData < SingleTypeFetchStep > {
178+ pub fn into_multi_type ( self ) -> FetchStepData < MultiTypeFetchStep > {
179+ FetchStepData :: < MultiTypeFetchStep > {
180+ service_name : self . service_name ,
181+ response_path : self . response_path ,
182+ input : self . input ,
183+ output_new : self . output_new . into_multi_type ( ) ,
184+ kind : self . kind ,
185+ used_for_requires : self . used_for_requires ,
186+ condition : self . condition ,
187+ variable_usages : self . variable_usages ,
188+ variable_definitions : self . variable_definitions ,
189+ mutation_field_position : self . mutation_field_position ,
190+ input_rewrites : self . input_rewrites ,
191+ output_rewrites : self . output_rewrites ,
192+ internal_aliases_locations : self . internal_aliases_locations ,
193+ }
194+ }
195+ }
0 commit comments