From 9676457b74c827756ab17dcfcfe0c0e3d991fd86 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Mar 2023 16:37:14 +0000 Subject: [PATCH] Version Packages (alpha) --- .changeset/pre.json | 8 ++- composition-js/CHANGELOG.md | 13 +++++ composition-js/package.json | 6 +-- .../CHANGELOG.md | 2 + .../package.json | 2 +- gateway-js/CHANGELOG.md | 54 +++++++++++++++++++ gateway-js/package.json | 8 +-- internals-js/CHANGELOG.md | 12 +++++ internals-js/package.json | 2 +- package-lock.json | 50 ++++++++--------- query-graphs-js/CHANGELOG.md | 6 +++ query-graphs-js/package.json | 4 +- query-planner-js/CHANGELOG.md | 50 +++++++++++++++++ query-planner-js/package.json | 6 +-- subgraph-js/CHANGELOG.md | 6 +++ subgraph-js/package.json | 4 +- 16 files changed, 191 insertions(+), 42 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 5f7e5386b..3f4925312 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -10,5 +10,11 @@ "@apollo/query-planner": "2.3.3", "@apollo/subgraph": "2.3.3" }, - "changesets": [] + "changesets": [ + "forty-gifts-burn", + "forty-hairs-flow", + "gentle-rockets-roll", + "old-humans-try", + "shaggy-knives-exercise" + ] } diff --git a/composition-js/CHANGELOG.md b/composition-js/CHANGELOG.md index fb8f446fe..b2f09d62f 100644 --- a/composition-js/CHANGELOG.md +++ b/composition-js/CHANGELOG.md @@ -1,5 +1,18 @@ # CHANGELOG for `@apollo/composition` +## 2.4.0-alpha.0 +### Minor Changes + + +- Addition of new query planner node types to enable federated subscriptions support ([#2389](https://github.com/apollographql/federation/pull/2389)) + + +### Patch Changes + +- Updated dependencies [[`6e2d24b5`](https://github.com/apollographql/federation/commit/6e2d24b5491914316b9930395817f0c3780f181a), [`1a555d98`](https://github.com/apollographql/federation/commit/1a555d98f2030814ebd5074269d035b7f298f71e)]: + - @apollo/federation-internals@2.4.0-alpha.0 + - @apollo/query-graphs@2.4.0-alpha.0 + ## 2.3.3 ### Patch Changes diff --git a/composition-js/package.json b/composition-js/package.json index ec3829571..1c1c1946e 100644 --- a/composition-js/package.json +++ b/composition-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/composition", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "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.3.3", - "@apollo/query-graphs": "2.3.3" + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-graphs": "2.4.0-alpha.0" }, "peerDependencies": { "graphql": "^16.5.0" diff --git a/federation-integration-testsuite-js/CHANGELOG.md b/federation-integration-testsuite-js/CHANGELOG.md index 423b52b64..04b5b1359 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.4.0-alpha.0 + ## 2.3.3 ## 2.3.2 diff --git a/federation-integration-testsuite-js/package.json b/federation-integration-testsuite-js/package.json index 97455a6d6..c6bd8e161 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.3.3", + "version": "2.4.0-alpha.0", "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 4c4632c21..0b3106621 100644 --- a/gateway-js/CHANGELOG.md +++ b/gateway-js/CHANGELOG.md @@ -1,5 +1,59 @@ # CHANGELOG for `@apollo/gateway` +## 2.4.0-alpha.0 +### Minor Changes + + +- This change introduces a configurable query plan cache. This option allows ([#2385](https://github.com/apollographql/federation/pull/2385)) + developers to provide their own query plan cache like so: + + ``` + new ApolloGateway({ + queryPlannerConfig: { + cache: new MyCustomQueryPlanCache(), + }, + }); + ``` + + The current default implementation is effectively as follows: + ``` + import { InMemoryLRUCache } from "@apollo/utils.keyvaluecache"; + + const cache = new InMemoryLRUCache({ + maxSize: Math.pow(2, 20) * 30, + sizeCalculation(obj: T): number { + return Buffer.byteLength(JSON.stringify(obj), "utf8"); + }, + }); + ``` + + TypeScript users should implement the `QueryPlanCache` type which is now + exported by `@apollo/query-planner`: + ``` + import { QueryPlanCache } from '@apollo/query-planner'; + + class MyCustomQueryPlanCache implements QueryPlanCache { + // ... + } + ``` + +- Adds debug/testing query planner options (`debug.bypassPlannerForSingleSubgraph`) to bypass the query planning ([#2441](https://github.com/apollographql/federation/pull/2441)) + process for federated supergraph having only a single subgraph. The option is disabled by default, is not recommended + for production, and is not supported (it may be removed later). It is meant for debugging/testing purposes. + +### Patch Changes + + +- Handle defaulted variables correctly during post-processing. ([#2443](https://github.com/apollographql/federation/pull/2443)) + + Users who tried to use built-in conditional directives (skip/include) with _defaulted_ variables and no variable provided would encounter an error thrown by operation post-processing saying that the variables weren't provided. The defaulted values went unaccounted for, so the operation would validate but then fail an assertion while resolving the conditional. + + With this change, defaulted variable values are now collected and provided to post-processing (with defaults being overwritten by variables that are actually provided). +- Updated dependencies [[`d4426ff9`](https://github.com/apollographql/federation/commit/d4426ff9ea86273c145351f80d8d18eb56ebab38), [`a9385bdb`](https://github.com/apollographql/federation/commit/a9385bdb0d6f5e9b03f9c143bbc7f34e5b5bf166), [`6e2d24b5`](https://github.com/apollographql/federation/commit/6e2d24b5491914316b9930395817f0c3780f181a), [`1a555d98`](https://github.com/apollographql/federation/commit/1a555d98f2030814ebd5074269d035b7f298f71e), [`ade7ceb8`](https://github.com/apollographql/federation/commit/ade7ceb8093f3c6ad01362d4aec4d806bff4e4fd)]: + - @apollo/query-planner@2.4.0-alpha.0 + - @apollo/composition@2.4.0-alpha.0 + - @apollo/federation-internals@2.4.0-alpha.0 + ## 2.3.3 ### Patch Changes diff --git a/gateway-js/package.json b/gateway-js/package.json index 08b2d9150..ed6a8a497 100644 --- a/gateway-js/package.json +++ b/gateway-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/gateway", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "description": "Apollo Gateway", "author": "Apollo ", "main": "dist/index.js", @@ -25,9 +25,9 @@ "access": "public" }, "dependencies": { - "@apollo/composition": "2.3.3", - "@apollo/federation-internals": "2.3.3", - "@apollo/query-planner": "2.3.3", + "@apollo/composition": "2.4.0-alpha.0", + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-planner": "2.4.0-alpha.0", "@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 48f8c8f88..008c162ce 100644 --- a/internals-js/CHANGELOG.md +++ b/internals-js/CHANGELOG.md @@ -1,5 +1,17 @@ # CHANGELOG for `@apollo/federation-internals` +## 2.4.0-alpha.0 +### Patch Changes + + +- Handle defaulted variables correctly during post-processing. ([#2443](https://github.com/apollographql/federation/pull/2443)) + + Users who tried to use built-in conditional directives (skip/include) with _defaulted_ variables and no variable provided would encounter an error thrown by operation post-processing saying that the variables weren't provided. The defaulted values went unaccounted for, so the operation would validate but then fail an assertion while resolving the conditional. + + With this change, defaulted variable values are now collected and provided to post-processing (with defaults being overwritten by variables that are actually provided). + +- Use globally available URL object instead of node builtin "url" module ([#2293](https://github.com/apollographql/federation/pull/2293)) + ## 2.3.3 ## 2.3.2 diff --git a/internals-js/package.json b/internals-js/package.json index 8f7108fb9..4a011fe61 100644 --- a/internals-js/package.json +++ b/internals-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/federation-internals", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "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 91d74cbeb..cdbd66c28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,11 +68,11 @@ }, "composition-js": { "name": "@apollo/composition", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "license": "SEE LICENSE IN ./LICENSE", "dependencies": { - "@apollo/federation-internals": "2.3.3", - "@apollo/query-graphs": "2.3.3" + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-graphs": "2.4.0-alpha.0" }, "engines": { "node": ">=14.15.0" @@ -83,7 +83,7 @@ }, "federation-integration-testsuite-js": { "name": "apollo-federation-integration-testsuite", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "license": "SEE LICENSE IN ./LICENSE", "dependencies": { "graphql-tag": "^2.12.6", @@ -92,12 +92,12 @@ }, "gateway-js": { "name": "@apollo/gateway", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "license": "SEE LICENSE IN ./LICENSE", "dependencies": { - "@apollo/composition": "2.3.3", - "@apollo/federation-internals": "2.3.3", - "@apollo/query-planner": "2.3.3", + "@apollo/composition": "2.4.0-alpha.0", + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-planner": "2.4.0-alpha.0", "@apollo/server-gateway-interface": "^1.1.0", "@apollo/usage-reporting-protobuf": "^4.1.0", "@apollo/utils.createhash": "^2.0.0", @@ -299,7 +299,7 @@ }, "internals-js": { "name": "@apollo/federation-internals", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "license": "SEE LICENSE IN ./LICENSE", "dependencies": { "chalk": "^4.1.0", @@ -16710,10 +16710,10 @@ }, "query-graphs-js": { "name": "@apollo/query-graphs", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "license": "SEE LICENSE IN ./LICENSE", "dependencies": { - "@apollo/federation-internals": "2.3.3", + "@apollo/federation-internals": "2.4.0-alpha.0", "deep-equal": "^2.0.5", "ts-graphviz": "^1.5.4", "uuid": "^9.0.0" @@ -16734,11 +16734,11 @@ }, "query-planner-js": { "name": "@apollo/query-planner", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "license": "SEE LICENSE IN ./LICENSE", "dependencies": { - "@apollo/federation-internals": "2.3.3", - "@apollo/query-graphs": "2.3.3", + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-graphs": "2.4.0-alpha.0", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", @@ -16781,11 +16781,11 @@ }, "subgraph-js": { "name": "@apollo/subgraph", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "license": "MIT", "dependencies": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.3.3" + "@apollo/federation-internals": "2.4.0-alpha.0" }, "engines": { "node": ">=14.15.0" @@ -16835,8 +16835,8 @@ "@apollo/composition": { "version": "file:composition-js", "requires": { - "@apollo/federation-internals": "2.3.3", - "@apollo/query-graphs": "2.3.3" + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-graphs": "2.4.0-alpha.0" } }, "@apollo/federation-internals": { @@ -16849,9 +16849,9 @@ "@apollo/gateway": { "version": "file:gateway-js", "requires": { - "@apollo/composition": "2.3.3", - "@apollo/federation-internals": "2.3.3", - "@apollo/query-planner": "2.3.3", + "@apollo/composition": "2.4.0-alpha.0", + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-planner": "2.4.0-alpha.0", "@apollo/server-gateway-interface": "^1.1.0", "@apollo/usage-reporting-protobuf": "^4.1.0", "@apollo/utils.createhash": "^2.0.0", @@ -16995,7 +16995,7 @@ "@apollo/query-graphs": { "version": "file:query-graphs-js", "requires": { - "@apollo/federation-internals": "2.3.3", + "@apollo/federation-internals": "2.4.0-alpha.0", "deep-equal": "^2.0.5", "ts-graphviz": "^1.5.4", "uuid": "^9.0.0" @@ -17009,8 +17009,8 @@ "@apollo/query-planner": { "version": "file:query-planner-js", "requires": { - "@apollo/federation-internals": "2.3.3", - "@apollo/query-graphs": "2.3.3", + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-graphs": "2.4.0-alpha.0", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", @@ -17202,7 +17202,7 @@ "version": "file:subgraph-js", "requires": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.3.3" + "@apollo/federation-internals": "2.4.0-alpha.0" } }, "@apollo/usage-reporting-protobuf": { diff --git a/query-graphs-js/CHANGELOG.md b/query-graphs-js/CHANGELOG.md index 4e345847a..be7559a2a 100644 --- a/query-graphs-js/CHANGELOG.md +++ b/query-graphs-js/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG for `@apollo/query-graphs` +## 2.4.0-alpha.0 +### Patch Changes + +- Updated dependencies [[`6e2d24b5`](https://github.com/apollographql/federation/commit/6e2d24b5491914316b9930395817f0c3780f181a), [`1a555d98`](https://github.com/apollographql/federation/commit/1a555d98f2030814ebd5074269d035b7f298f71e)]: + - @apollo/federation-internals@2.4.0-alpha.0 + ## 2.3.3 ### Patch Changes diff --git a/query-graphs-js/package.json b/query-graphs-js/package.json index b38ce4488..9571adeae 100644 --- a/query-graphs-js/package.json +++ b/query-graphs-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-graphs", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "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.3.3", + "@apollo/federation-internals": "2.4.0-alpha.0", "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 c41ea3bbd..c18f2a76f 100644 --- a/query-planner-js/CHANGELOG.md +++ b/query-planner-js/CHANGELOG.md @@ -1,5 +1,55 @@ # CHANGELOG for `@apollo/query-planner` +## 2.4.0-alpha.0 +### Minor Changes + + +- This change introduces a configurable query plan cache. This option allows ([#2385](https://github.com/apollographql/federation/pull/2385)) + developers to provide their own query plan cache like so: + + ``` + new ApolloGateway({ + queryPlannerConfig: { + cache: new MyCustomQueryPlanCache(), + }, + }); + ``` + + The current default implementation is effectively as follows: + ``` + import { InMemoryLRUCache } from "@apollo/utils.keyvaluecache"; + + const cache = new InMemoryLRUCache({ + maxSize: Math.pow(2, 20) * 30, + sizeCalculation(obj: T): number { + return Buffer.byteLength(JSON.stringify(obj), "utf8"); + }, + }); + ``` + + TypeScript users should implement the `QueryPlanCache` type which is now + exported by `@apollo/query-planner`: + ``` + import { QueryPlanCache } from '@apollo/query-planner'; + + class MyCustomQueryPlanCache implements QueryPlanCache { + // ... + } + ``` + +- Addition of new query planner node types to enable federated subscriptions support ([#2389](https://github.com/apollographql/federation/pull/2389)) + + +- Adds debug/testing query planner options (`debug.bypassPlannerForSingleSubgraph`) to bypass the query planning ([#2441](https://github.com/apollographql/federation/pull/2441)) + process for federated supergraph having only a single subgraph. The option is disabled by default, is not recommended + for production, and is not supported (it may be removed later). It is meant for debugging/testing purposes. + +### Patch Changes + +- Updated dependencies [[`6e2d24b5`](https://github.com/apollographql/federation/commit/6e2d24b5491914316b9930395817f0c3780f181a), [`1a555d98`](https://github.com/apollographql/federation/commit/1a555d98f2030814ebd5074269d035b7f298f71e)]: + - @apollo/federation-internals@2.4.0-alpha.0 + - @apollo/query-graphs@2.4.0-alpha.0 + ## 2.3.3 ### Patch Changes diff --git a/query-planner-js/package.json b/query-planner-js/package.json index b5ddbe05e..3b663c4a4 100644 --- a/query-planner-js/package.json +++ b/query-planner-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-planner", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "description": "Apollo Query Planner", "author": "Apollo ", "main": "dist/index.js", @@ -25,8 +25,8 @@ "access": "public" }, "dependencies": { - "@apollo/federation-internals": "2.3.3", - "@apollo/query-graphs": "2.3.3", + "@apollo/federation-internals": "2.4.0-alpha.0", + "@apollo/query-graphs": "2.4.0-alpha.0", "@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 9bd2bc1ae..73c79dcb0 100644 --- a/subgraph-js/CHANGELOG.md +++ b/subgraph-js/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG for `@apollo/subgraph` +## 2.4.0-alpha.0 +### Patch Changes + +- Updated dependencies [[`6e2d24b5`](https://github.com/apollographql/federation/commit/6e2d24b5491914316b9930395817f0c3780f181a), [`1a555d98`](https://github.com/apollographql/federation/commit/1a555d98f2030814ebd5074269d035b7f298f71e)]: + - @apollo/federation-internals@2.4.0-alpha.0 + ## 2.3.3 ### Patch Changes diff --git a/subgraph-js/package.json b/subgraph-js/package.json index ebcdfa537..542947552 100644 --- a/subgraph-js/package.json +++ b/subgraph-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/subgraph", - "version": "2.3.3", + "version": "2.4.0-alpha.0", "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.3.3" + "@apollo/federation-internals": "2.4.0-alpha.0" }, "peerDependencies": { "graphql": "^16.5.0"