Skip to content

Commit a909d10

Browse files
committed
graphql: Remove unused CollectedResponseKey
1 parent ab23241 commit a909d10

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

graphql/src/store/prefetch.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use graph::data::value::Object;
77
use graph::prelude::{r, CacheWeight};
88
use graph::slog::warn;
99
use graph::util::cache_weight;
10-
use indexmap::IndexMap;
1110
use lazy_static::lazy_static;
1211
use std::collections::{BTreeMap, HashMap};
1312
use std::rc::Rc;
@@ -628,38 +627,6 @@ fn execute_selection_set<'a>(
628627
}
629628
}
630629

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-
663630
/// Executes a field.
664631
fn execute_field(
665632
resolver: &StoreResolver,

0 commit comments

Comments
 (0)