router
router copied to clipboard
Implemented FederatedQueryGraphBuilderApi::process_subgraph_schema for FederatedQueryGraphBuilder
This PR addresses FED-200, which outlines the implementation of FederatedQueryGraphBuilderApi::process_subgraph_schema for FederatedQueryGraphBuilder.
I want to point out that I added a dependency to the either crate. This was already a transitive dependency (used by itertools). It was helpful for this implementation. I also noticed that it would be useful in other places as well. For example, it would be nice to have a method like FederationSchema::possible_runtime_types but which returned a non-consuming iterator rather than a freshly allocated IndexSet. Since either::Either implements iterator so long as both sides are iterators, we could copy the existing possible_runtime_types method and use Eithers for each branch. I'm sure there are other places where we could make similar low-hanging-fruit optimizations.