Skip to content

Commit 5710418

Browse files
committed
Compatibility with GraphQL 17
Fixes #2431
1 parent b3cf544 commit 5710418

13 files changed

Lines changed: 1713 additions & 1639 deletions

File tree

‎.changeset/ninety-geese-visit.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'apollo-angular': minor
3+
---
4+
5+
Compatibility with GraphQL 17

‎.github/workflows/main.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
strategy:
9090
matrix:
9191
angular_version: [20, 21, 22]
92-
graphql_version: [16]
92+
graphql_version: [16, 17]
9393
node_version: [20, 22, 24, 26]
9494
exclude:
9595
- angular_version: 20

‎packages/apollo-angular/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
},
4040
"peerDependencies": {
4141
"@angular/core": "^20.0.0 || ^21.0.0 || ^22.0.0",
42-
"@apollo/client": "^4.0.1",
43-
"graphql": "^16.0.0",
42+
"@apollo/client": "^4.2.3",
43+
"graphql": "^16.0.0 || ^17.0.0",
4444
"rxjs": "^7.8.0"
4545
},
4646
"dependencies": {

‎packages/apollo-angular/schematics/install/index.cts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export function factory(options: Schema): Rule {
1818
export function createDependenciesMap(options: Schema): Record<string, string> {
1919
return {
2020
'apollo-angular': '^9.0.0',
21-
'@apollo/client': '^4.0.1',
22-
graphql: `^${options.graphql ?? '16.0.0'}`,
21+
'@apollo/client': '^4.2.3',
22+
graphql: `^${options.graphql ?? '17.0.0'}`,
2323
};
2424
}
2525

‎packages/apollo-angular/schematics/install/schema.cts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ export interface Schema {
33
project: string;
44
/** Url to your GraphQL endpoint */
55
endpoint?: string;
6-
/** Version of GraphQL (16 by default) */
6+
/** Version of GraphQL (17 by default) */
77
graphql?: string;
88
}

‎packages/apollo-angular/schematics/install/schema.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
},
2020
"graphql": {
2121
"type": "string",
22-
"minLength": 0,
23-
"default": "16",
22+
"minLength": 2,
23+
"default": "17",
2424
"x-prompt": "Version of GraphQL"
2525
}
2626
},

‎packages/apollo-angular/schematics/tests/ng-add.spec.cts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('ng-add with standalone', () => {
1818

1919
const dependenciesMap = createDependenciesMap({
2020
project: 'my-project',
21-
graphql: '16',
21+
graphql: '17',
2222
});
2323

2424
for (const dependency in dependenciesMap) {

‎packages/apollo-angular/src/only-complete-data.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ export const onlyComplete = onlyCompleteData;
5454
* Same as `onlyCompleteData()` but for `Apollo.watchFragment()`.
5555
*/
5656
export function onlyCompleteFragment<TData>(): ForWatchFragment<TData> {
57+
// @ts-expect-error
5758
return filter((result): result is CompleteFragment<TData> => result.dataState === 'complete');
5859
}

‎packages/apollo-angular/test-utils/ObservableStream.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ export interface TakeOptions {
3434
timeout?: number;
3535
}
3636
type ObservableEvent<T> =
37-
| { type: 'next'; value: T }
38-
| { type: 'error'; error: any }
39-
| { type: 'complete' };
37+
{ type: 'next'; value: T } | { type: 'error'; error: any } | { type: 'complete' };
4038

4139
function formatMessage(expected: ObservableEvent<any>, actual: ObservableEvent<any>) {
4240
return printDiffOrStringify(expected, actual, { expand: true });

‎packages/demo/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@angular/core": "^20.3.0",
1818
"@angular/platform-browser": "^20.3.0",
1919
"@angular/router": "^20.3.0",
20-
"@apollo/client": "^4.0.1",
20+
"@apollo/client": "^4.2.10",
2121
"apollo-angular": "workspace:*",
2222
"typescript": "~5.8.0"
2323
}

0 commit comments

Comments
 (0)