apollographql / federation

🌐  Build and scale a single data graph across multiple services with Apollo's federation gateway.
https://apollographql.com/docs/federation/
Other
668 stars 254 forks source link

fix: ensure we are removing ALL useless groups #3163

Closed dariuszkuc closed 1 month ago

dariuszkuc commented 1 month ago

When removing "useless" fetch nodes/groups we remove them in-place while still iterating over the same list. This leads to potentially skipping processing of some the children fetch nodes, as when we remove nodes we left shift all remaining children but the iterator keeps the old position unchanged effectively skipping next child.

svc-apollo-docs commented 1 month ago

✅ Docs Preview Ready

No new or changed pages found.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: d3387dd07de293e022acbc294d6a2b10ada02cc3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages | Name | Type | | --------------------------------------- | ----- | | @apollo/query-planner | Patch | | @apollo/gateway | Patch | | @apollo/federation-internals | Patch | | @apollo/composition | Patch | | @apollo/query-graphs | Patch | | @apollo/subgraph | Patch | | apollo-federation-integration-testsuite | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 1 month ago

Deploy Preview for apollo-federation-docs canceled.

Name Link
Latest commit d3387dd07de293e022acbc294d6a2b10ada02cc3
Latest deploy log https://app.netlify.com/sites/apollo-federation-docs/deploys/6707fb5cded95d00080ce44e
codesandbox-ci[bot] commented 1 month ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.