diff --git a/composition-js/CHANGELOG.md b/composition-js/CHANGELOG.md index 6cd4f10ca..da31db55d 100644 --- a/composition-js/CHANGELOG.md +++ b/composition-js/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG for `@apollo/composition` +## 2.8.5 + +### Patch Changes + +- Updated dependencies []: + - @apollo/federation-internals@2.8.5 + - @apollo/query-graphs@2.8.5 + ## 2.8.4 ### Patch Changes diff --git a/composition-js/package.json b/composition-js/package.json index 879bf59fd..427b28e91 100644 --- a/composition-js/package.json +++ b/composition-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/composition", - "version": "2.8.4", + "version": "2.8.5", "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.8.4", - "@apollo/query-graphs": "2.8.4" + "@apollo/federation-internals": "2.8.5", + "@apollo/query-graphs": "2.8.5" }, "peerDependencies": { "graphql": "^16.5.0" diff --git a/docs/source/entities/index.mdx b/docs/source/entities/index.mdx index 101dc00e1..221de3b17 100644 --- a/docs/source/entities/index.mdx +++ b/docs/source/entities/index.mdx @@ -4,6 +4,12 @@ subtitle: Learn how to define federated types across multiple subgraphs description: Learn to define and contribute to object types that resolve their fields across multiple services in a federated GraphQL architecture. --- + + _Entities_ are a fundamental building block of Apollo Federation. In a supergraph, an entity is an object type that can resolve its fields across multiple subgraphs. Each subgraph can contribute different fields to the entity and is responsible for resolving only the fields that it contributes. diff --git a/docs/source/federation-2/moving-to-federation-2.mdx b/docs/source/federation-2/moving-to-federation-2.mdx index c272919b0..e02e1efd5 100644 --- a/docs/source/federation-2/moving-to-federation-2.mdx +++ b/docs/source/federation-2/moving-to-federation-2.mdx @@ -172,7 +172,7 @@ Federation 2 provides powerful new features that require making some changes to - Safely migrating fields from one subgraph to another with [`@override`](../federated-types/federated-directives#override) - Hiding internal routing fields from graph consumers with [`@inaccessible`](../federated-types/federated-directives#inaccessible) -The schema changes you make are backward incompatible with Federation 1, which means you won't be able to use Federation 1 composition anymore unless you revert those changes. +The schema changes you make are not backward compatible with Federation 1, which means you won't be able to use Federation 1 composition anymore unless you revert those changes. ### Update your subgraph library diff --git a/docs/source/index.mdx b/docs/source/index.mdx index 7aff0a094..5e3337a69 100644 --- a/docs/source/index.mdx +++ b/docs/source/index.mdx @@ -4,6 +4,12 @@ subtitle: Learn how to combine your GraphQL APIs into a unified supergraph description: Learn how Apollo Federation can help you declaratively combine your services into a unified, federated GraphQL API using a microservices architecture. --- + + ## What is Apollo Federation? Apollo Federation lets you declaratively combine multiple GraphQL APIs into a single, federated graph. This federated graph enables clients to interact with multiple APIs through a single request. diff --git a/docs/source/quickstart.mdx b/docs/source/quickstart.mdx index 69ffa40e0..2de402fe8 100644 --- a/docs/source/quickstart.mdx +++ b/docs/source/quickstart.mdx @@ -34,6 +34,12 @@ To learn more about Apollo Federation and the benefits of using it with GraphOS, - [Introduction to Apollo Federation](./) - [Introduction to GraphOS](/graphos) + + ## Prerequisites To complete this quickstart, you must have the following: diff --git a/federation-integration-testsuite-js/CHANGELOG.md b/federation-integration-testsuite-js/CHANGELOG.md index 6f2d35b9b..aee029069 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.8.5 + ## 2.8.4 ## 2.8.3 diff --git a/federation-integration-testsuite-js/package.json b/federation-integration-testsuite-js/package.json index 8226d9ea5..aac0f3407 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.8.4", + "version": "2.8.5", "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 f5ad0508e..944abff87 100644 --- a/gateway-js/CHANGELOG.md +++ b/gateway-js/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG for `@apollo/gateway` +## 2.8.5 + +### Patch Changes + +- Updated dependencies [[`926cbb7949200e12b81100a07fa3438b5ae9efd0`](https://github.com/apollographql/federation/commit/926cbb7949200e12b81100a07fa3438b5ae9efd0)]: + - @apollo/query-planner@2.8.5 + - @apollo/composition@2.8.5 + - @apollo/federation-internals@2.8.5 + ## 2.8.4 ### Patch Changes diff --git a/gateway-js/package.json b/gateway-js/package.json index 3d6e1fef8..e60b603c8 100644 --- a/gateway-js/package.json +++ b/gateway-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/gateway", - "version": "2.8.4", + "version": "2.8.5", "description": "Apollo Gateway", "author": "Apollo ", "main": "dist/index.js", @@ -25,9 +25,9 @@ "access": "public" }, "dependencies": { - "@apollo/composition": "2.8.4", - "@apollo/federation-internals": "2.8.4", - "@apollo/query-planner": "2.8.4", + "@apollo/composition": "2.8.5", + "@apollo/federation-internals": "2.8.5", + "@apollo/query-planner": "2.8.5", "@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 160cac070..8babca7f7 100644 --- a/internals-js/CHANGELOG.md +++ b/internals-js/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG for `@apollo/federation-internals` +## 2.8.5 + ## 2.8.4 ### Patch Changes diff --git a/internals-js/package.json b/internals-js/package.json index cef7a14af..c118964c5 100644 --- a/internals-js/package.json +++ b/internals-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/federation-internals", - "version": "2.8.4", + "version": "2.8.5", "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 0210d41ee..caae02707 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,11 +70,11 @@ }, "composition-js": { "name": "@apollo/composition", - "version": "2.8.4", + "version": "2.8.5", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.8.4", - "@apollo/query-graphs": "2.8.4" + "@apollo/federation-internals": "2.8.5", + "@apollo/query-graphs": "2.8.5" }, "engines": { "node": ">=14.15.0" @@ -85,7 +85,7 @@ }, "federation-integration-testsuite-js": { "name": "apollo-federation-integration-testsuite", - "version": "2.8.4", + "version": "2.8.5", "license": "Elastic-2.0", "dependencies": { "graphql-tag": "^2.12.6", @@ -94,12 +94,12 @@ }, "gateway-js": { "name": "@apollo/gateway", - "version": "2.8.4", + "version": "2.8.5", "license": "Elastic-2.0", "dependencies": { - "@apollo/composition": "2.8.4", - "@apollo/federation-internals": "2.8.4", - "@apollo/query-planner": "2.8.4", + "@apollo/composition": "2.8.5", + "@apollo/federation-internals": "2.8.5", + "@apollo/query-planner": "2.8.5", "@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.8.4", + "version": "2.8.5", "license": "Elastic-2.0", "dependencies": { "@types/uuid": "^9.0.0", @@ -17859,10 +17859,10 @@ }, "query-graphs-js": { "name": "@apollo/query-graphs", - "version": "2.8.4", + "version": "2.8.5", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.8.4", + "@apollo/federation-internals": "2.8.5", "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.8.4", + "version": "2.8.5", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.8.4", - "@apollo/query-graphs": "2.8.4", + "@apollo/federation-internals": "2.8.5", + "@apollo/query-graphs": "2.8.5", "@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.8.4", + "version": "2.8.5", "license": "MIT", "dependencies": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.8.4" + "@apollo/federation-internals": "2.8.5" }, "engines": { "node": ">=14.15.0" diff --git a/query-graphs-js/CHANGELOG.md b/query-graphs-js/CHANGELOG.md index e298f10db..c4a3c25df 100644 --- a/query-graphs-js/CHANGELOG.md +++ b/query-graphs-js/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG for `@apollo/query-graphs` +## 2.8.5 + +### Patch Changes + +- Updated dependencies []: + - @apollo/federation-internals@2.8.5 + ## 2.8.4 ### Patch Changes diff --git a/query-graphs-js/package.json b/query-graphs-js/package.json index 00f5bbb45..d5fc92e8c 100644 --- a/query-graphs-js/package.json +++ b/query-graphs-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-graphs", - "version": "2.8.4", + "version": "2.8.5", "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.8.4", + "@apollo/federation-internals": "2.8.5", "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 98ff2ca8a..4c93d867d 100644 --- a/query-planner-js/CHANGELOG.md +++ b/query-planner-js/CHANGELOG.md @@ -1,5 +1,15 @@ # CHANGELOG for `@apollo/query-planner` +## 2.8.5 + +### Patch Changes + +- Switched plan count from `Number` to a `BigInt`. ([#3128](https://github.com/apollographql/federation/pull/3128)) + +- Updated dependencies []: + - @apollo/federation-internals@2.8.5 + - @apollo/query-graphs@2.8.5 + ## 2.8.4 ### Patch Changes diff --git a/query-planner-js/package.json b/query-planner-js/package.json index 6056bb544..3fae40901 100644 --- a/query-planner-js/package.json +++ b/query-planner-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-planner", - "version": "2.8.4", + "version": "2.8.5", "description": "Apollo Query Planner", "author": "Apollo ", "main": "dist/index.js", @@ -25,8 +25,8 @@ "access": "public" }, "dependencies": { - "@apollo/federation-internals": "2.8.4", - "@apollo/query-graphs": "2.8.4", + "@apollo/federation-internals": "2.8.5", + "@apollo/query-graphs": "2.8.5", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", diff --git a/query-planner-js/src/buildPlan.ts b/query-planner-js/src/buildPlan.ts index d12701a91..9825a9bcb 100644 --- a/query-planner-js/src/buildPlan.ts +++ b/query-planner-js/src/buildPlan.ts @@ -666,7 +666,7 @@ class QueryPlanningTraversal { const maxPlansToCompute = this.parameters.config.debug.maxEvaluatedPlans; while (planCount > maxPlansToCompute && firstBranch.length > 1) { // we remove the right-most option of the first branch, and them move that branch to it's new place. - const prevSize = firstBranch.length; + const prevSize = BigInt(firstBranch.length); firstBranch.pop(); planCount -= planCount / prevSize; this.reorderFirstBranch(); @@ -679,7 +679,7 @@ class QueryPlanningTraversal { // Note that if `!this.isTopLevel`, then this means we're resolving a sub-plan for an edge condition, and we // don't want to count those as "evaluated plans". if (this.parameters.statistics && this.isTopLevel) { - this.parameters.statistics.evaluatedPlanCount += planCount; + this.parameters.statistics.evaluatedPlanCount += Number(planCount); } debug.log(() => `All branches:${this.closedBranches.map((opts, i) => `\n${i}:${opts.map((opt => `\n - ${closedPathToString(opt)}`))}`)}`); @@ -3610,16 +3610,16 @@ function mapOptionsToSelections( return selectionSet.selectionsInReverseOrder().map(node => [node, options]); } -function possiblePlans(closedBranches: ClosedBranch[]): number { - let totalCombinations = 1; +function possiblePlans(closedBranches: ClosedBranch[]): bigint { + let totalCombinations = BigInt(1); for (let i = 0; i < closedBranches.length; ++i){ - const eltSize = closedBranches[i].length; - if (eltSize === 0) { + const eltSize = BigInt(closedBranches[i].length); + if (eltSize === BigInt(0)) { // This would correspond to not being to find *any* path for a particular queried field, which means we have no plan // for the overall query. Now, this shouldn't happen in practice if composition validation has been run successfully // (and is not buggy), since the goal of composition validation is exactly to ensure we can never run into this path. // In any case, we will throw later if that happens, but let's just return the proper result here, which is no plan at all. - return 0; + return BigInt(0); } totalCombinations *= eltSize; } diff --git a/subgraph-js/CHANGELOG.md b/subgraph-js/CHANGELOG.md index a0749fc9c..446e7aea4 100644 --- a/subgraph-js/CHANGELOG.md +++ b/subgraph-js/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG for `@apollo/subgraph` +## 2.8.5 + +### Patch Changes + +- Updated dependencies []: + - @apollo/federation-internals@2.8.5 + ## 2.8.4 ### Patch Changes diff --git a/subgraph-js/package.json b/subgraph-js/package.json index f9e554b4f..8f6f0fee0 100644 --- a/subgraph-js/package.json +++ b/subgraph-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/subgraph", - "version": "2.8.4", + "version": "2.8.5", "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.8.4" + "@apollo/federation-internals": "2.8.5" }, "peerDependencies": { "graphql": "^16.5.0"