apollographql / federation-next

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

Add source-aware data structures for graph path, path tree, and fetch dependency graph #286

Closed sachindshinde closed 4 months ago

sachindshinde commented 4 months ago

This PR adds source-aware data structures for graph paths, path trees, and fetch dependency graphs.

To summarize:

  1. Graph paths have been updated to use condition indexes (which speeds up comparisons, and helps us avoid merging until the end) and condition resolution IDs (which help us better track data dependencies).
  2. Path trees have been updated to accommodate the above changes.
  3. Fetch dependency graphs have similarly been updated to accommodate the above changes, along with changes toward splitting out source-agnostic and source-specific code. This introduces a few traits at the boundary of such code (SourceFetchDependencyGraphApi and SourcePathApi).