apollographql / federation-next

Moved to the Router repository
https://github.com/apollographql/router/tree/dev/apollo-federation
Other
19 stars 1 forks source link

Implement FetchDependencyGraph::reduce() #275

Closed goto-bus-stop closed 4 months ago

goto-bus-stop commented 4 months ago

Port of: https://github.com/apollographql/federation/blob/bbf83946800d0e6f83307e1941cd7052f8a3c38d/query-planner-js/src/buildPlan.ts#L2444-L2458

It looks a bit inefficient but maybe it's okay as the JS comments said.

I would like to have a (some) test(s) for this, though it's not that easy to unit test fetch dependency graph things.