@@ -7,7 +7,6 @@ use graph::data::value::Object;
7
7
use graph:: prelude:: { r, CacheWeight } ;
8
8
use graph:: slog:: warn;
9
9
use graph:: util:: cache_weight;
10
- use indexmap:: IndexMap ;
11
10
use lazy_static:: lazy_static;
12
11
use std:: collections:: { BTreeMap , HashMap } ;
13
12
use std:: rc:: Rc ;
@@ -628,38 +627,6 @@ fn execute_selection_set<'a>(
628
627
}
629
628
}
630
629
631
- /// If the top-level selection is on an object, there will be a single entry in `obj_types` with all
632
- /// the collected fields.
633
- ///
634
- /// The interesting case is if the top-level selection is an interface. `iface_cond` will be the
635
- /// interface type and `iface_fields` the selected fields on the interface. `obj_types` are the
636
- /// fields selected on objects by fragments. In `collect_fields`, the `iface_fields` will then be
637
- /// merged into each entry in `obj_types`. See also: e0d6da3e-60cf-41a5-b83c-b60a7a766d4a
638
- #[ derive( Default , Debug ) ]
639
- struct CollectedResponseKey < ' a > {
640
- iface_cond : Option < & ' a s:: InterfaceType > ,
641
- iface_fields : Vec < & ' a a:: Field > ,
642
- obj_types : IndexMap < sast:: ObjectType < ' a > , Vec < & ' a a:: Field > > ,
643
- collected_column_names : SelectedAttributes < ' a > ,
644
- }
645
-
646
- impl < ' a > IntoIterator for CollectedResponseKey < ' a > {
647
- type Item = ( ObjectOrInterface < ' a > , Vec < & ' a a:: Field > ) ;
648
- type IntoIter = Box < dyn Iterator < Item = Self :: Item > + ' a > ;
649
-
650
- fn into_iter ( self ) -> Self :: IntoIter {
651
- // Make sure the interface fields are processed first.
652
- // See also: e0d6da3e-60cf-41a5-b83c-b60a7a766d4a
653
- let iface_fields = self . iface_fields ;
654
- Box :: new (
655
- self . iface_cond
656
- . map ( |cond| ( ObjectOrInterface :: Interface ( cond) , iface_fields) )
657
- . into_iter ( )
658
- . chain ( self . obj_types . into_iter ( ) . map ( |( c, f) | ( c. into ( ) , f) ) ) ,
659
- )
660
- }
661
- }
662
-
663
630
/// Executes a field.
664
631
fn execute_field (
665
632
resolver : & StoreResolver ,
0 commit comments