Skip to content

Commit 9614b26

Browse files
lennyburdettesachindshindetnineslingdylan-apollobenjamn
authored
Federation 2.11 (#3262)
Co-authored-by: Sachin D. Shinde <[email protected]> Co-authored-by: Taylor Ninesling <[email protected]> Co-authored-by: Dylan Anthony <[email protected]> Co-authored-by: Ben Newman <[email protected]> Co-authored-by: Taylor Jones <[email protected]> Co-authored-by: Taylor Jones <[email protected]> Co-authored-by: Nicholas Cioli <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Maria Elisabeth Schreiber <[email protected]> Co-authored-by: Chris Lenfest <[email protected]> Co-authored-by: Edward Huang <[email protected]> Co-authored-by: Matt Peake <[email protected]> Co-authored-by: kamila-brylewska-zendesk <[email protected]> Co-authored-by: Andrew McGivery <[email protected]> Co-authored-by: Duckki Oe <[email protected]> Co-authored-by: Dale Seo <[email protected]>
1 parent 02ebb9e commit 9614b26

File tree

26 files changed

+915
-102
lines changed

26 files changed

+915
-102
lines changed

.changeset/afraid-queens-drive.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"apollo-federation-integration-testsuite": patch
3+
"@apollo/query-planner": patch
4+
"@apollo/query-graphs": patch
5+
"@apollo/composition": patch
6+
"@apollo/federation-internals": patch
7+
"@apollo/subgraph": patch
8+
"@apollo/gateway": patch
9+
---
10+
11+
Preparing preview.2 release

.changeset/lucky-pillows-rhyme.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@apollo/composition": minor
3+
"@apollo/federation-internals": minor
4+
"apollo-federation-integration-testsuite": minor
5+
"@apollo/gateway": minor
6+
"@apollo/query-graphs": minor
7+
"@apollo/query-planner": minor
8+
"@apollo/subgraph": minor
9+
---
10+
11+
Add connect spec v0.2

.changeset/pre.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"mode": "exit",
3+
"tag": "preview",
4+
"initialVersions": {
5+
"@apollo/composition": "2.10.0",
6+
"apollo-federation-integration-testsuite": "2.10.0",
7+
"@apollo/gateway": "2.10.0",
8+
"@apollo/federation-internals": "2.10.0",
9+
"@apollo/query-graphs": "2.10.0",
10+
"@apollo/query-planner": "2.10.0",
11+
"@apollo/subgraph": "2.10.0"
12+
},
13+
"changesets": [
14+
"afraid-queens-drive",
15+
"five-suits-drum",
16+
"lucky-pillows-rhyme"
17+
]
18+
}

.changeset/sixty-plums-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/composition": patch
3+
---
4+
5+
Allow merging external types when using arrays as default arguments.

composition-js/CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# CHANGELOG for `@apollo/composition`
22

3+
## 2.11.0-preview.2
4+
5+
### Patch Changes
6+
7+
- Preparing preview.2 release ([#3255](https://github.com/apollographql/federation/pull/3255))
8+
9+
- Updated dependencies [[`3e2b0a8569a9fe46726182887ed0b4bfc0b52468`](https://github.com/apollographql/federation/commit/3e2b0a8569a9fe46726182887ed0b4bfc0b52468)]:
10+
- @apollo/query-graphs@2.11.0-preview.2
11+
- @apollo/federation-internals@2.11.0-preview.2
12+
13+
## 2.11.0-preview.1
14+
15+
### Patch Changes
16+
17+
- Updated dependencies [[`1462c91879d41884c0a7e60551d8dd0d67c832d3`](https://github.com/apollographql/federation/commit/1462c91879d41884c0a7e60551d8dd0d67c832d3)]:
18+
- @apollo/query-graphs@2.11.0-preview.1
19+
- @apollo/federation-internals@2.11.0-preview.1
20+
21+
## 2.11.0-preview.0
22+
23+
### Minor Changes
24+
25+
- Add connect spec v0.2 ([#3228](https://github.com/apollographql/federation/pull/3228))
26+
27+
### Patch Changes
28+
29+
- Updated dependencies [[`e7e67579908d5cd2fa6fe558228dffe4808cd98d`](https://github.com/apollographql/federation/commit/e7e67579908d5cd2fa6fe558228dffe4808cd98d)]:
30+
- @apollo/federation-internals@2.11.0-preview.0
31+
- @apollo/query-graphs@2.11.0-preview.0
32+
333
## 2.10.0
434

535
### Minor Changes

composition-js/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/composition",
3-
"version": "2.10.0",
3+
"version": "2.11.0-preview.2",
44
"description": "Apollo Federation composition utilities",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -27,8 +27,8 @@
2727
"access": "public"
2828
},
2929
"dependencies": {
30-
"@apollo/federation-internals": "2.10.0",
31-
"@apollo/query-graphs": "2.10.0"
30+
"@apollo/federation-internals": "2.11.0-preview.2",
31+
"@apollo/query-graphs": "2.11.0-preview.2"
3232
},
3333
"peerDependencies": {
3434
"graphql": "^16.5.0"

composition-js/src/__tests__/compose.test.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,47 @@ describe('composition', () => {
614614
`);
615615
});
616616

617+
it('merges default arguments when they are arrays', () => {
618+
const subgraphA = {
619+
name: 'subgraph-a',
620+
typeDefs: gql`
621+
type Query {
622+
a: A @shareable
623+
}
624+
625+
type A @key(fields: "id") {
626+
id: ID
627+
get(ids: [ID] = []): [B] @external
628+
req: Int @requires(fields: "get { __typename }")
629+
}
630+
631+
type B @key(fields: "id", resolvable: false) {
632+
id: ID
633+
}
634+
`
635+
};
636+
const subgraphB = {
637+
name: 'subgraph-b',
638+
typeDefs: gql`
639+
type Query {
640+
a: A @shareable
641+
}
642+
643+
type A @key(fields: "id") {
644+
id: ID
645+
get(ids: [ID] = []): [B]
646+
}
647+
648+
type B @key(fields: "id") {
649+
id: ID
650+
}
651+
`
652+
};
653+
654+
const result = composeAsFed2Subgraphs([subgraphA, subgraphB]);
655+
assertCompositionSuccess(result);
656+
});
657+
617658
describe('merging of type references', () => {
618659
describe('for field types', () => {
619660
it('errors on incompatible types', () => {

0 commit comments

Comments
 (0)