From a1b44aabb36565b8c98875f82e7e842f872a1b75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 00:29:12 -0700 Subject: [PATCH] release: on branch main (#3159) This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @apollo/composition@2.9.3 ### Patch Changes - Updated dependencies \[[`345661c558773e4eb5d5f0b28464a8d1acdc2a2d`](https://github.com/apollographql/federation/commit/345661c558773e4eb5d5f0b28464a8d1acdc2a2d), [`e00e1c9892b48ac89823597113989830877966ef`](https://github.com/apollographql/federation/commit/e00e1c9892b48ac89823597113989830877966ef), [`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: - @apollo/query-graphs@2.9.3 - @apollo/federation-internals@2.9.3 ## @apollo/gateway@2.9.3 ### Patch Changes - Updated dependencies \[[`345661c558773e4eb5d5f0b28464a8d1acdc2a2d`](https://github.com/apollographql/federation/commit/345661c558773e4eb5d5f0b28464a8d1acdc2a2d), [`7fe1465cf35c2efe37ac5c73fac2b7ea04173318`](https://github.com/apollographql/federation/commit/7fe1465cf35c2efe37ac5c73fac2b7ea04173318), [`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: - @apollo/query-planner@2.9.3 - @apollo/federation-internals@2.9.3 - @apollo/composition@2.9.3 ## @apollo/federation-internals@2.9.3 ### Patch Changes - fix: normalize field set selection sets ([#3162](https://github.com/apollographql/federation/pull/3162)) `FieldSet` scalar represents a selection set without outer braces. This means that users could potentially specify some selections that could be normalized (i.e. eliminate duplicate field selections, hoist/collapse unnecessary inline fragments, etc). Previously we were using `@requires` field set selection AS-IS for edge conditions. With this change we will now normalize the `FieldSet` selections before using them as fetch node conditions. - Fixed missing referenced variables in the `variableUsages` field of fetch operations ([#3166](https://github.com/apollographql/federation/pull/3166)) Query variables used in fetch operation should be listed in the `variableUsages` field. However, there was a bug where variables referenced by query-level directives could be missing in the field. - Fix fragment generation recursion logic to apply minification on all subselections. ([#3158](https://github.com/apollographql/federation/pull/3158)) - Fixed a bug that `__typename` with applied directives gets lost in fetch operations. ([#3164](https://github.com/apollographql/federation/pull/3164)) The sibling typename optimization used by query planner simplifies operations by folding `__typename` selections into their sibling selections. However, that optimization does not account for directives or aliases. The bug was applying the optimization even if the `__typename` has directives on it, which caused the selection to lose its directives. Now, `__typename` with directives (or aliases) are excluded from the optimization. ## @apollo/query-graphs@2.9.3 ### Patch Changes - Fixes edge case where contextual arguments can yield inefficient query plans. Also fixes naming of query plan arguments which can be a problem when using contextual variables in multiple subgraphs ([#3140](https://github.com/apollographql/federation/pull/3140)) - When eliminating suboptimal indirect paths during query planning, properly check for a direct `@key` edge at the end of the potential direct path. ([#3160](https://github.com/apollographql/federation/pull/3160)) - Fixed missing referenced variables in the `variableUsages` field of fetch operations ([#3166](https://github.com/apollographql/federation/pull/3166)) Query variables used in fetch operation should be listed in the `variableUsages` field. However, there was a bug where variables referenced by query-level directives could be missing in the field. - Updated dependencies \[[`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: - @apollo/federation-internals@2.9.3 ## @apollo/query-planner@2.9.3 ### Patch Changes - Fixes edge case where contextual arguments can yield inefficient query plans. Also fixes naming of query plan arguments which can be a problem when using contextual variables in multiple subgraphs ([#3140](https://github.com/apollographql/federation/pull/3140)) - Ensure all useless fetch groups are removed ([#3163](https://github.com/apollographql/federation/pull/3163)) 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. - fix: normalize field set selection sets ([#3162](https://github.com/apollographql/federation/pull/3162)) `FieldSet` scalar represents a selection set without outer braces. This means that users could potentially specify some selections that could be normalized (i.e. eliminate duplicate field selections, hoist/collapse unnecessary inline fragments, etc). Previously we were using `@requires` field set selection AS-IS for edge conditions. With this change we will now normalize the `FieldSet` selections before using them as fetch node conditions. - Fixed missing referenced variables in the `variableUsages` field of fetch operations ([#3166](https://github.com/apollographql/federation/pull/3166)) Query variables used in fetch operation should be listed in the `variableUsages` field. However, there was a bug where variables referenced by query-level directives could be missing in the field. - Fixed a bug that `__typename` with applied directives gets lost in fetch operations. ([#3164](https://github.com/apollographql/federation/pull/3164)) The sibling typename optimization used by query planner simplifies operations by folding `__typename` selections into their sibling selections. However, that optimization does not account for directives or aliases. The bug was applying the optimization even if the `__typename` has directives on it, which caused the selection to lose its directives. Now, `__typename` with directives (or aliases) are excluded from the optimization. - Updated dependencies \[[`345661c558773e4eb5d5f0b28464a8d1acdc2a2d`](https://github.com/apollographql/federation/commit/345661c558773e4eb5d5f0b28464a8d1acdc2a2d), [`e00e1c9892b48ac89823597113989830877966ef`](https://github.com/apollographql/federation/commit/e00e1c9892b48ac89823597113989830877966ef), [`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: - @apollo/query-graphs@2.9.3 - @apollo/federation-internals@2.9.3 ## @apollo/subgraph@2.9.3 ### Patch Changes - Updated dependencies \[[`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: - @apollo/federation-internals@2.9.3 ## apollo-federation-integration-testsuite@2.9.3 Co-authored-by: github-actions[bot] --- .changeset/fuzzy-readers-happen.md | 6 ---- .changeset/orange-ears-sip.md | 5 --- .changeset/quiet-rings-fly.md | 7 ---- .changeset/slow-dots-explode.md | 8 ----- .changeset/stupid-geese-camp.md | 9 ------ .changeset/violet-cows-talk.md | 5 --- .changeset/wise-yaks-switch.md | 8 ----- composition-js/CHANGELOG.md | 8 +++++ composition-js/package.json | 6 ++-- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- gateway-js/CHANGELOG.md | 9 ++++++ gateway-js/package.json | 8 ++--- internals-js/CHANGELOG.md | 18 +++++++++++ internals-js/package.json | 2 +- package-lock.json | 32 +++++++++---------- query-graphs-js/CHANGELOG.md | 15 +++++++++ query-graphs-js/package.json | 4 +-- query-planner-js/CHANGELOG.md | 26 +++++++++++++++ query-planner-js/package.json | 6 ++-- subgraph-js/CHANGELOG.md | 7 ++++ subgraph-js/package.json | 4 +-- 22 files changed, 117 insertions(+), 80 deletions(-) delete mode 100644 .changeset/fuzzy-readers-happen.md delete mode 100644 .changeset/orange-ears-sip.md delete mode 100644 .changeset/quiet-rings-fly.md delete mode 100644 .changeset/slow-dots-explode.md delete mode 100644 .changeset/stupid-geese-camp.md delete mode 100644 .changeset/violet-cows-talk.md delete mode 100644 .changeset/wise-yaks-switch.md diff --git a/.changeset/fuzzy-readers-happen.md b/.changeset/fuzzy-readers-happen.md deleted file mode 100644 index fa4910073..000000000 --- a/.changeset/fuzzy-readers-happen.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@apollo/query-planner": patch -"@apollo/query-graphs": patch ---- - -Fixes edge case where contextual arguments can yield inefficient query plans. Also fixes naming of query plan arguments which can be a problem when using contextual variables in multiple subgraphs diff --git a/.changeset/orange-ears-sip.md b/.changeset/orange-ears-sip.md deleted file mode 100644 index a1c55e351..000000000 --- a/.changeset/orange-ears-sip.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/query-graphs": patch ---- - -When eliminating suboptimal indirect paths during query planning, properly check for a direct `@key` edge at the end of the potential direct path. diff --git a/.changeset/quiet-rings-fly.md b/.changeset/quiet-rings-fly.md deleted file mode 100644 index b4d0fc53f..000000000 --- a/.changeset/quiet-rings-fly.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@apollo/query-planner": patch ---- - -Ensure all useless fetch groups are removed - -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. diff --git a/.changeset/slow-dots-explode.md b/.changeset/slow-dots-explode.md deleted file mode 100644 index 8028f255b..000000000 --- a/.changeset/slow-dots-explode.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@apollo/query-planner": patch -"@apollo/federation-internals": patch ---- - -fix: normalize field set selection sets - -`FieldSet` scalar represents a selection set without outer braces. This means that users could potentially specify some selections that could be normalized (i.e. eliminate duplicate field selections, hoist/collapse unnecessary inline fragments, etc). Previously we were using `@requires` field set selection AS-IS for edge conditions. With this change we will now normalize the `FieldSet` selections before using them as fetch node conditions. \ No newline at end of file diff --git a/.changeset/stupid-geese-camp.md b/.changeset/stupid-geese-camp.md deleted file mode 100644 index 99967382f..000000000 --- a/.changeset/stupid-geese-camp.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@apollo/query-planner": patch -"@apollo/query-graphs": patch -"@apollo/federation-internals": patch ---- - -Fixed missing referenced variables in the `variableUsages` field of fetch operations - -Query variables used in fetch operation should be listed in the `variableUsages` field. However, there was a bug where variables referenced by query-level directives could be missing in the field. diff --git a/.changeset/violet-cows-talk.md b/.changeset/violet-cows-talk.md deleted file mode 100644 index 28fb9bcd9..000000000 --- a/.changeset/violet-cows-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/federation-internals": patch ---- - -Fix fragment generation recursion logic to apply minification on all subselections. diff --git a/.changeset/wise-yaks-switch.md b/.changeset/wise-yaks-switch.md deleted file mode 100644 index 9d93d0efb..000000000 --- a/.changeset/wise-yaks-switch.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@apollo/federation-internals": patch -"@apollo/query-planner": patch ---- - -Fixed a bug that `__typename` with applied directives gets lost in fetch operations. - -The sibling typename optimization used by query planner simplifies operations by folding `__typename` selections into their sibling selections. However, that optimization does not account for directives or aliases. The bug was applying the optimization even if the `__typename` has directives on it, which caused the selection to lose its directives. Now, `__typename` with directives (or aliases) are excluded from the optimization. diff --git a/composition-js/CHANGELOG.md b/composition-js/CHANGELOG.md index 56e7753bb..00dfbea1b 100644 --- a/composition-js/CHANGELOG.md +++ b/composition-js/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG for `@apollo/composition` +## 2.9.3 + +### Patch Changes + +- Updated dependencies [[`345661c558773e4eb5d5f0b28464a8d1acdc2a2d`](https://github.com/apollographql/federation/commit/345661c558773e4eb5d5f0b28464a8d1acdc2a2d), [`e00e1c9892b48ac89823597113989830877966ef`](https://github.com/apollographql/federation/commit/e00e1c9892b48ac89823597113989830877966ef), [`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: + - @apollo/query-graphs@2.9.3 + - @apollo/federation-internals@2.9.3 + ## 2.9.2 ### Patch Changes diff --git a/composition-js/package.json b/composition-js/package.json index c60f19be1..facbde449 100644 --- a/composition-js/package.json +++ b/composition-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/composition", - "version": "2.9.2", + "version": "2.9.3", "description": "Apollo Federation composition utilities", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -27,8 +27,8 @@ "access": "public" }, "dependencies": { - "@apollo/federation-internals": "2.9.2", - "@apollo/query-graphs": "2.9.2" + "@apollo/federation-internals": "2.9.3", + "@apollo/query-graphs": "2.9.3" }, "peerDependencies": { "graphql": "^16.5.0" diff --git a/federation-integration-testsuite-js/CHANGELOG.md b/federation-integration-testsuite-js/CHANGELOG.md index 81106b530..8754771f2 100644 --- a/federation-integration-testsuite-js/CHANGELOG.md +++ b/federation-integration-testsuite-js/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG for `federation-integration-testsuite-js` +## 2.9.3 + ## 2.9.2 ## 2.9.1 diff --git a/federation-integration-testsuite-js/package.json b/federation-integration-testsuite-js/package.json index 0a1027b91..75b817824 100644 --- a/federation-integration-testsuite-js/package.json +++ b/federation-integration-testsuite-js/package.json @@ -1,7 +1,7 @@ { "name": "apollo-federation-integration-testsuite", "private": true, - "version": "2.9.2", + "version": "2.9.3", "description": "Apollo Federation Integrations / Test Fixtures", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/gateway-js/CHANGELOG.md b/gateway-js/CHANGELOG.md index ce43bcacf..9526447c5 100644 --- a/gateway-js/CHANGELOG.md +++ b/gateway-js/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG for `@apollo/gateway` +## 2.9.3 + +### Patch Changes + +- Updated dependencies [[`345661c558773e4eb5d5f0b28464a8d1acdc2a2d`](https://github.com/apollographql/federation/commit/345661c558773e4eb5d5f0b28464a8d1acdc2a2d), [`7fe1465cf35c2efe37ac5c73fac2b7ea04173318`](https://github.com/apollographql/federation/commit/7fe1465cf35c2efe37ac5c73fac2b7ea04173318), [`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: + - @apollo/query-planner@2.9.3 + - @apollo/federation-internals@2.9.3 + - @apollo/composition@2.9.3 + ## 2.9.2 ### Patch Changes diff --git a/gateway-js/package.json b/gateway-js/package.json index bd7fc2c6a..262209797 100644 --- a/gateway-js/package.json +++ b/gateway-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/gateway", - "version": "2.9.2", + "version": "2.9.3", "description": "Apollo Gateway", "author": "Apollo ", "main": "dist/index.js", @@ -25,9 +25,9 @@ "access": "public" }, "dependencies": { - "@apollo/composition": "2.9.2", - "@apollo/federation-internals": "2.9.2", - "@apollo/query-planner": "2.9.2", + "@apollo/composition": "2.9.3", + "@apollo/federation-internals": "2.9.3", + "@apollo/query-planner": "2.9.3", "@apollo/server-gateway-interface": "^1.1.0", "@apollo/usage-reporting-protobuf": "^4.1.0", "@apollo/utils.createhash": "^2.0.0", diff --git a/internals-js/CHANGELOG.md b/internals-js/CHANGELOG.md index 803b705b1..fa5f84fbf 100644 --- a/internals-js/CHANGELOG.md +++ b/internals-js/CHANGELOG.md @@ -1,5 +1,23 @@ # CHANGELOG for `@apollo/federation-internals` +## 2.9.3 + +### Patch Changes + +- fix: normalize field set selection sets ([#3162](https://github.com/apollographql/federation/pull/3162)) + + `FieldSet` scalar represents a selection set without outer braces. This means that users could potentially specify some selections that could be normalized (i.e. eliminate duplicate field selections, hoist/collapse unnecessary inline fragments, etc). Previously we were using `@requires` field set selection AS-IS for edge conditions. With this change we will now normalize the `FieldSet` selections before using them as fetch node conditions. + +- Fixed missing referenced variables in the `variableUsages` field of fetch operations ([#3166](https://github.com/apollographql/federation/pull/3166)) + + Query variables used in fetch operation should be listed in the `variableUsages` field. However, there was a bug where variables referenced by query-level directives could be missing in the field. + +- Fix fragment generation recursion logic to apply minification on all subselections. ([#3158](https://github.com/apollographql/federation/pull/3158)) + +- Fixed a bug that `__typename` with applied directives gets lost in fetch operations. ([#3164](https://github.com/apollographql/federation/pull/3164)) + + The sibling typename optimization used by query planner simplifies operations by folding `__typename` selections into their sibling selections. However, that optimization does not account for directives or aliases. The bug was applying the optimization even if the `__typename` has directives on it, which caused the selection to lose its directives. Now, `__typename` with directives (or aliases) are excluded from the optimization. + ## 2.9.2 ### Patch Changes diff --git a/internals-js/package.json b/internals-js/package.json index 74036cb3c..93e1b973a 100644 --- a/internals-js/package.json +++ b/internals-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/federation-internals", - "version": "2.9.2", + "version": "2.9.3", "description": "Apollo Federation internal utilities", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/package-lock.json b/package-lock.json index c714329b6..24d28b920 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,11 +70,11 @@ }, "composition-js": { "name": "@apollo/composition", - "version": "2.9.2", + "version": "2.9.3", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.9.2", - "@apollo/query-graphs": "2.9.2" + "@apollo/federation-internals": "2.9.3", + "@apollo/query-graphs": "2.9.3" }, "engines": { "node": ">=14.15.0" @@ -85,7 +85,7 @@ }, "federation-integration-testsuite-js": { "name": "apollo-federation-integration-testsuite", - "version": "2.9.2", + "version": "2.9.3", "license": "Elastic-2.0", "dependencies": { "graphql-tag": "^2.12.6", @@ -94,12 +94,12 @@ }, "gateway-js": { "name": "@apollo/gateway", - "version": "2.9.2", + "version": "2.9.3", "license": "Elastic-2.0", "dependencies": { - "@apollo/composition": "2.9.2", - "@apollo/federation-internals": "2.9.2", - "@apollo/query-planner": "2.9.2", + "@apollo/composition": "2.9.3", + "@apollo/federation-internals": "2.9.3", + "@apollo/query-planner": "2.9.3", "@apollo/server-gateway-interface": "^1.1.0", "@apollo/usage-reporting-protobuf": "^4.1.0", "@apollo/utils.createhash": "^2.0.0", @@ -125,7 +125,7 @@ }, "internals-js": { "name": "@apollo/federation-internals", - "version": "2.9.2", + "version": "2.9.3", "license": "Elastic-2.0", "dependencies": { "@types/uuid": "^9.0.0", @@ -17859,10 +17859,10 @@ }, "query-graphs-js": { "name": "@apollo/query-graphs", - "version": "2.9.2", + "version": "2.9.3", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.9.2", + "@apollo/federation-internals": "2.9.3", "deep-equal": "^2.0.5", "ts-graphviz": "^1.5.4", "uuid": "^9.0.0" @@ -17876,11 +17876,11 @@ }, "query-planner-js": { "name": "@apollo/query-planner", - "version": "2.9.2", + "version": "2.9.3", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.9.2", - "@apollo/query-graphs": "2.9.2", + "@apollo/federation-internals": "2.9.3", + "@apollo/query-graphs": "2.9.3", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", @@ -17909,11 +17909,11 @@ }, "subgraph-js": { "name": "@apollo/subgraph", - "version": "2.9.2", + "version": "2.9.3", "license": "MIT", "dependencies": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.9.2" + "@apollo/federation-internals": "2.9.3" }, "engines": { "node": ">=14.15.0" diff --git a/query-graphs-js/CHANGELOG.md b/query-graphs-js/CHANGELOG.md index f85f08656..1c868adfa 100644 --- a/query-graphs-js/CHANGELOG.md +++ b/query-graphs-js/CHANGELOG.md @@ -1,5 +1,20 @@ # CHANGELOG for `@apollo/query-graphs` +## 2.9.3 + +### Patch Changes + +- Fixes edge case where contextual arguments can yield inefficient query plans. Also fixes naming of query plan arguments which can be a problem when using contextual variables in multiple subgraphs ([#3140](https://github.com/apollographql/federation/pull/3140)) + +- When eliminating suboptimal indirect paths during query planning, properly check for a direct `@key` edge at the end of the potential direct path. ([#3160](https://github.com/apollographql/federation/pull/3160)) + +- Fixed missing referenced variables in the `variableUsages` field of fetch operations ([#3166](https://github.com/apollographql/federation/pull/3166)) + + Query variables used in fetch operation should be listed in the `variableUsages` field. However, there was a bug where variables referenced by query-level directives could be missing in the field. + +- Updated dependencies [[`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: + - @apollo/federation-internals@2.9.3 + ## 2.9.2 ### Patch Changes diff --git a/query-graphs-js/package.json b/query-graphs-js/package.json index cacb70ce1..4f92cceb7 100644 --- a/query-graphs-js/package.json +++ b/query-graphs-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-graphs", - "version": "2.9.2", + "version": "2.9.3", "description": "Apollo Federation library to work with 'query graphs'", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -23,7 +23,7 @@ "node": ">=14.15.0" }, "dependencies": { - "@apollo/federation-internals": "2.9.2", + "@apollo/federation-internals": "2.9.3", "deep-equal": "^2.0.5", "ts-graphviz": "^1.5.4", "uuid": "^9.0.0" diff --git a/query-planner-js/CHANGELOG.md b/query-planner-js/CHANGELOG.md index 3113073ec..a85c4c0d2 100644 --- a/query-planner-js/CHANGELOG.md +++ b/query-planner-js/CHANGELOG.md @@ -1,5 +1,31 @@ # CHANGELOG for `@apollo/query-planner` +## 2.9.3 + +### Patch Changes + +- Fixes edge case where contextual arguments can yield inefficient query plans. Also fixes naming of query plan arguments which can be a problem when using contextual variables in multiple subgraphs ([#3140](https://github.com/apollographql/federation/pull/3140)) + +- Ensure all useless fetch groups are removed ([#3163](https://github.com/apollographql/federation/pull/3163)) + + 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. + +- fix: normalize field set selection sets ([#3162](https://github.com/apollographql/federation/pull/3162)) + + `FieldSet` scalar represents a selection set without outer braces. This means that users could potentially specify some selections that could be normalized (i.e. eliminate duplicate field selections, hoist/collapse unnecessary inline fragments, etc). Previously we were using `@requires` field set selection AS-IS for edge conditions. With this change we will now normalize the `FieldSet` selections before using them as fetch node conditions. + +- Fixed missing referenced variables in the `variableUsages` field of fetch operations ([#3166](https://github.com/apollographql/federation/pull/3166)) + + Query variables used in fetch operation should be listed in the `variableUsages` field. However, there was a bug where variables referenced by query-level directives could be missing in the field. + +- Fixed a bug that `__typename` with applied directives gets lost in fetch operations. ([#3164](https://github.com/apollographql/federation/pull/3164)) + + The sibling typename optimization used by query planner simplifies operations by folding `__typename` selections into their sibling selections. However, that optimization does not account for directives or aliases. The bug was applying the optimization even if the `__typename` has directives on it, which caused the selection to lose its directives. Now, `__typename` with directives (or aliases) are excluded from the optimization. + +- Updated dependencies [[`345661c558773e4eb5d5f0b28464a8d1acdc2a2d`](https://github.com/apollographql/federation/commit/345661c558773e4eb5d5f0b28464a8d1acdc2a2d), [`e00e1c9892b48ac89823597113989830877966ef`](https://github.com/apollographql/federation/commit/e00e1c9892b48ac89823597113989830877966ef), [`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: + - @apollo/query-graphs@2.9.3 + - @apollo/federation-internals@2.9.3 + ## 2.9.2 ### Patch Changes diff --git a/query-planner-js/package.json b/query-planner-js/package.json index c6fc13ea8..22ca42be2 100644 --- a/query-planner-js/package.json +++ b/query-planner-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-planner", - "version": "2.9.2", + "version": "2.9.3", "description": "Apollo Query Planner", "author": "Apollo ", "main": "dist/index.js", @@ -25,8 +25,8 @@ "access": "public" }, "dependencies": { - "@apollo/federation-internals": "2.9.2", - "@apollo/query-graphs": "2.9.2", + "@apollo/federation-internals": "2.9.3", + "@apollo/query-graphs": "2.9.3", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", diff --git a/subgraph-js/CHANGELOG.md b/subgraph-js/CHANGELOG.md index acd0935d0..ca72065e0 100644 --- a/subgraph-js/CHANGELOG.md +++ b/subgraph-js/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG for `@apollo/subgraph` +## 2.9.3 + +### Patch Changes + +- Updated dependencies [[`cc4573471696ef78d04fa00c4cf8e5c50314ba9f`](https://github.com/apollographql/federation/commit/cc4573471696ef78d04fa00c4cf8e5c50314ba9f), [`062572b3253e8640b60a0bf58b83945094b76b6f`](https://github.com/apollographql/federation/commit/062572b3253e8640b60a0bf58b83945094b76b6f), [`df5eb3cb0e2b4802fcd425ab9c23714de2707db3`](https://github.com/apollographql/federation/commit/df5eb3cb0e2b4802fcd425ab9c23714de2707db3), [`1c99cb0dcc6c639ac351210932623ab0bd6907e4`](https://github.com/apollographql/federation/commit/1c99cb0dcc6c639ac351210932623ab0bd6907e4)]: + - @apollo/federation-internals@2.9.3 + ## 2.9.2 ### Patch Changes diff --git a/subgraph-js/package.json b/subgraph-js/package.json index cfed18475..16aa69954 100644 --- a/subgraph-js/package.json +++ b/subgraph-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/subgraph", - "version": "2.9.2", + "version": "2.9.3", "description": "Apollo Subgraph Utilities", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -25,7 +25,7 @@ }, "dependencies": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.9.2" + "@apollo/federation-internals": "2.9.3" }, "peerDependencies": { "graphql": "^16.5.0"