INNER CODE UNIT · Rust

with_document

apollographql/apollo-rs · crates/apollo-smith/src/lib.rs:315

    pub fn with_document(u: &'a mut Unstructured<'a>, document: Document) -> Result<Self> {
        let mut implements_graph = implements_graph::ImplementsGraph::new();
        for itf in &document.interface_type_definitions {
            implements_graph.node_for(&itf.name);
            for parent in &itf.interfaces {
                implements_graph.add_edge(&itf.name, parent);
            }
        }
        for obj in &document.object_type_definitions {
            implements_graph.node_for(&obj.name);
            for parent in &obj.implements_interfaces {
                implements_graph.add_edge(&obj.name, parent);
            }
        }
        let mut builder = Self {
            u,
            object_type_defs: document.object_type_definitions,
            interface_type_defs: document.interface_type_definitions,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…