diff --git a/.changeset/tame-rabbits-cheat.md b/.changeset/tame-rabbits-cheat.md deleted file mode 100644 index 272dccbefa8..00000000000 --- a/.changeset/tame-rabbits-cheat.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@graphql-tools/federation': patch ---- - -Merge the elements of the lists if the root field is shared across different subgraphs - -```graphql -type Query { - products: [Product] # If this field is returned by multiple subgraphs, the elements of the lists will be merged -} -``` diff --git a/.changeset/thick-grapes-shop.md b/.changeset/thick-grapes-shop.md deleted file mode 100644 index 9b1c460cb30..00000000000 --- a/.changeset/thick-grapes-shop.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@graphql-tools/utils': patch ---- - -If the given objects are arrays with the same length, merge the elements. - -```ts -const a = [{ a: 1 }, { b: 2 }]; -const b = [{ c: 3 }, { d: 4 }]; -const result = mergeDeep(a, b); // [{ a: 1, c: 3 }, { b: 2, d: 4 }] -``` diff --git a/benchmark/federation/CHANGELOG.md b/benchmark/federation/CHANGELOG.md index 35a180985c3..fd2daaff820 100644 --- a/benchmark/federation/CHANGELOG.md +++ b/benchmark/federation/CHANGELOG.md @@ -1,5 +1,13 @@ # federation-benchmark +## 0.0.142 + +### Patch Changes + +- Updated dependencies + [[`0f7059b`](https://github.com/ardatan/graphql-tools/commit/0f7059beb218d0012c48e121c55e7db386796bee)]: + - @graphql-tools/federation@2.0.1 + ## 0.0.141 ### Patch Changes diff --git a/benchmark/federation/package.json b/benchmark/federation/package.json index 76c3736df4e..9e7103835da 100644 --- a/benchmark/federation/package.json +++ b/benchmark/federation/package.json @@ -1,6 +1,6 @@ { "name": "federation-benchmark", - "version": "0.0.141", + "version": "0.0.142", "private": true, "scripts": { "loadtest:federation": "k6 -e ENDPOINT=federation run k6.js", @@ -11,7 +11,7 @@ "dependencies": { "@apollo/gateway": "2.8.0", "@apollo/subgraph": "2.8.0", - "@graphql-tools/federation": "2.0.0", + "@graphql-tools/federation": "2.0.1", "@graphql-tools/stitch": "9.2.9", "cross-env": "7.0.3", "express": "4.19.2", diff --git a/packages/federation/CHANGELOG.md b/packages/federation/CHANGELOG.md index 3853fea5692..ed8a492d1db 100644 --- a/packages/federation/CHANGELOG.md +++ b/packages/federation/CHANGELOG.md @@ -1,5 +1,24 @@ # @graphql-tools/federation +## 2.0.1 + +### Patch Changes + +- [#6238](https://github.com/ardatan/graphql-tools/pull/6238) + [`0f7059b`](https://github.com/ardatan/graphql-tools/commit/0f7059beb218d0012c48e121c55e7db386796bee) + Thanks [@ardatan](https://github.com/ardatan)! - Merge the elements of the lists if the root field + is shared across different subgraphs + + ```graphql + type Query { + products: [Product] # If this field is returned by multiple subgraphs, the elements of the lists will be merged + } + ``` + +- Updated dependencies + [[`0f7059b`](https://github.com/ardatan/graphql-tools/commit/0f7059beb218d0012c48e121c55e7db386796bee)]: + - @graphql-tools/utils@10.2.2 + ## 2.0.0 ### Major Changes diff --git a/packages/federation/package.json b/packages/federation/package.json index c258b7db33e..599564282cb 100644 --- a/packages/federation/package.json +++ b/packages/federation/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-tools/federation", - "version": "2.0.0", + "version": "2.0.1", "type": "module", "description": "Useful tools to create and manipulate GraphQL schemas.", "repository": { @@ -55,7 +55,7 @@ "@graphql-tools/merge": "^9.0.3", "@graphql-tools/schema": "^10.0.4", "@graphql-tools/stitch": "^9.2.9", - "@graphql-tools/utils": "^10.2.1", + "@graphql-tools/utils": "^10.2.2", "@graphql-tools/wrap": "^10.0.3", "@whatwg-node/fetch": "^0.9.17", "tslib": "^2.4.0", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 604188b7090..996be7a9317 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,20 @@ # @graphql-tools/utils +## 10.2.2 + +### Patch Changes + +- [#6238](https://github.com/ardatan/graphql-tools/pull/6238) + [`0f7059b`](https://github.com/ardatan/graphql-tools/commit/0f7059beb218d0012c48e121c55e7db386796bee) + Thanks [@ardatan](https://github.com/ardatan)! - If the given objects are arrays with the same + length, merge the elements. + + ```ts + const a = [{ a: 1 }, { b: 2 }] + const b = [{ c: 3 }, { d: 4 }] + const result = mergeDeep(a, b) // [{ a: 1, c: 3 }, { b: 2, d: 4 }] + ``` + ## 10.2.1 ### Patch Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index 0cb6e0b0df6..7fefbc8b7e1 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-tools/utils", - "version": "10.2.1", + "version": "10.2.2", "type": "module", "description": "Common package containing utils and types for GraphQL tools", "repository": {