hive-router 0.2.0

GraphQL router for Federation, part of the Hive platform
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::collections::HashSet;

use crate::query_planner::ast::type_aware_selection::TypeAwareSelection;

// TODO: Consider interior mutability with Rc<RefCell<ExcludedFromLookup>> to avoid full clone while traversing
#[derive(Default)]
pub struct ExcludedFromLookup<'graph> {
    pub graph_ids: HashSet<&'graph str>,
    pub requirement: HashSet<&'graph TypeAwareSelection>,
}

impl<'graph> ExcludedFromLookup<'graph> {
    pub fn new() -> ExcludedFromLookup<'graph> {
        Default::default()
    }
}