diff --git a/package.json b/package.json index 7cbac117b..78238401e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@angular/platform-browser-dynamic": "^18.0.0", "@angular/platform-server": "^18.0.0", "@angular/router": "^18.0.0", - "@apollo/client": "^3.10.4", + "@apollo/client": "^3.13.0", "@babel/core": "^7.24.6", "@babel/preset-env": "^7.24.6", "@changesets/changelog-github": "^0.5.0", diff --git a/packages/apollo-angular/package.json b/packages/apollo-angular/package.json index dabbe8fb8..3828d078c 100644 --- a/packages/apollo-angular/package.json +++ b/packages/apollo-angular/package.json @@ -35,7 +35,7 @@ }, "peerDependencies": { "@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0", - "@apollo/client": "^3.10.0", + "@apollo/client": "^3.13.0", "graphql": "^15.0.0 || ^16.0.0", "rxjs": "^6.0.0 || ^7.0.0" }, diff --git a/packages/apollo-angular/src/query-ref.ts b/packages/apollo-angular/src/query-ref.ts index 1647a0851..481b319be 100644 --- a/packages/apollo-angular/src/query-ref.ts +++ b/packages/apollo-angular/src/query-ref.ts @@ -8,6 +8,7 @@ import type { OperationVariables, SubscribeToMoreOptions, TypedDocumentNode, + Unmasked, UpdateQueryOptions, } from '@apollo/client/core'; import { NetworkStatus } from '@apollo/client/core'; @@ -103,7 +104,7 @@ export class QueryRef { return this.obsQuery.fetchMore(fetchMoreOptions); } - public subscribeToMore( + public subscribeToMore( options: SubscribeToMoreOptions, ): () => void { // XXX: there's a bug in apollo-client typings @@ -111,7 +112,9 @@ export class QueryRef { return this.obsQuery.subscribeToMore(options as any); } - public updateQuery(mapFn: (previousQueryResult: T, options: UpdateQueryOptions) => T): void { + public updateQuery( + mapFn: (previousQueryResult: Unmasked, options: UpdateQueryOptions) => Unmasked, + ): void { return this.obsQuery.updateQuery(mapFn); } diff --git a/packages/apollo-angular/src/subscription.ts b/packages/apollo-angular/src/subscription.ts index 290fd29ca..e26bb909d 100644 --- a/packages/apollo-angular/src/subscription.ts +++ b/packages/apollo-angular/src/subscription.ts @@ -1,14 +1,9 @@ import type { DocumentNode } from 'graphql'; import type { Observable } from 'rxjs'; import { Injectable } from '@angular/core'; -import type { OperationVariables, TypedDocumentNode } from '@apollo/client/core'; +import type { FetchResult, OperationVariables, TypedDocumentNode } from '@apollo/client/core'; import { Apollo } from './apollo'; -import { - EmptyObject, - ExtraSubscriptionOptions, - SubscriptionOptionsAlone, - SubscriptionResult, -} from './types'; +import { EmptyObject, ExtraSubscriptionOptions, SubscriptionOptionsAlone } from './types'; @Injectable() export abstract class Subscription { @@ -21,8 +16,8 @@ export abstract class Subscription, extra?: ExtraSubscriptionOptions, - ): Observable> { - return this.apollo.use(this.client).subscribe( + ): Observable> { + return this.apollo.use(this.client).subscribe( { ...options, variables, diff --git a/yarn.lock b/yarn.lock index 17a26789e..8d6787f9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -251,10 +251,10 @@ dependencies: tslib "^2.3.0" -"@apollo/client@^3.10.4": - version "3.10.8" - resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.10.8.tgz#96b1548818e45fac752ec2bd318e5466d9ca26b5" - integrity sha512-UaaFEitRrPRWV836wY2L7bd3HRCfbMie1jlYMcmazFAK23MVhz/Uq7VG1nwbotPb5xzFsw5RF4Wnp2G3dWPM3g== +"@apollo/client@^3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.13.0.tgz#a9c310a77a0460512daef03a47b6b92e85f1a631" + integrity sha512-sCrdGw6Jv+0csdy5YwnAJ231CJWvJOBsHB3mZWdI+jA62lsJcV2TYWSaIYd7Cno3Apk8JBDbEGrMEKALeQUmOQ== dependencies: "@graphql-typed-document-node/core" "^3.1.1" "@wry/caches" "^1.0.0" @@ -265,7 +265,6 @@ optimism "^0.18.0" prop-types "^15.7.2" rehackt "^0.1.0" - response-iterator "^0.2.6" symbol-observable "^4.0.0" ts-invariant "^0.10.3" tslib "^2.3.0" @@ -10677,11 +10676,6 @@ resolve@1.22.8, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.12.0, resolve@^1.14.2 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -response-iterator@^0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/response-iterator/-/response-iterator-0.2.6.tgz#249005fb14d2e4eeb478a3f735a28fd8b4c9f3da" - integrity sha512-pVzEEzrsg23Sh053rmDUvLSkGXluZio0qu8VT6ukrYuvtjVfCbDZH9d6PGXb8HZfzdNZt8feXv/jvUzlhRgLnw== - restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -11351,7 +11345,16 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -11393,7 +11396,14 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12454,7 +12464,7 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==