router icon indicating copy to clipboard operation
router copied to clipboard

Implemented FederatedQueryGraphBuilderApi::process_subgraph_schema for FederatedQueryGraphBuilder

Open TylerBloom opened this issue 1 year ago • 0 comments

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.

TylerBloom avatar May 21 '24 18:05 TylerBloom