| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| apollo-angular@12.0.0 source code.tar.gz | 2025-10-13 | 2.8 MB | |
| apollo-angular@12.0.0 source code.zip | 2025-10-13 | 2.8 MB | |
| README.md | 2025-10-13 | 6.7 kB | |
| Totals: 3 Items | 5.6 MB | 0 | |
[!CAUTION] Before upgrading
apollo-angularto v12, be sure to read all the breaking changes from@apollo/clientv4 that also applies toapollo-angular.
Major Changes
-
#2372
44ed9a5Thanks @jerelmiller! - Namespaced typesBefore:
```ts import type { MutationOptionsAlone, QueryOptionsAlone, SubscriptionOptionsAlone, WatchQueryOptions, WatchQueryOptionsAlone, } from 'apollo-angular'; import type { BatchOptions, Options } from 'apollo-angular/http';
type AllTypes = | Options | BatchOptions | MutationOptionsAlone | QueryOptionsAlone | SubscriptionOptionsAlone | WatchQueryOptions | WatchQueryOptionsAlone; ```
After:
```ts import type { Apollo, Mutation, Query, Subscription } from 'apollo-angular'; import type { HttpBatchLink, HttpLink } from 'apollo-angular/http';
type AllTypes = | HttpLink.Options | HttpBatchLink.Options | Mutation.MutateOptions | Query.FetchOptions | Subscription.SubscribeOptions | Apollo.WatchQueryOptions | Query.WatchOptions; ```
-
#2372
bdc93dfThanks @jerelmiller! -httpHeadersis a classMigrate your code like so:
diff - const link = httpHeaders(); + const link = new HttpHeadersLink(); -
#2372
8c0b7f0Thanks @jerelmiller! - MoveuseZoneoption into subscription optionsdiff - const obs = apollo.subscribe(options, { useZone: false }); + const obs = apollo.subscribe({ ...options, useZone: false }); -
#2372
b9c62a5Thanks @jerelmiller! - Combined parameters ofQuery,MutationandSubscriptionclasses generated via codegenMigrate your code like so:
```diff class MyComponent { myQuery = inject(MyQuery); myMutation = inject(MyMutation); mySubscription = inject(MySubscription);
constructor() { - myQuery.watch({ myVariable: 'foo' }, { fetchPolicy: 'cache-and-network' }); + myQuery.watch({ variables: { myVariable: 'foo' }, fetchPolicy: 'cache-and-network' })
- myMutation.mutate({ myVariable: 'foo' }, { errorPolicy: 'ignore' });
-
myMutation.mutate({ variables: { myVariable: 'foo' }, errorPolicy: 'ignore' });
-
mySubscription.subscribe({ myVariable: 'foo' }, { fetchPolicy: 'network-only' });
- mySubscription.subscribe({ variables: { myVariable: 'foo' }, fetchPolicy: 'network-only' }); } } ```
Minor Changes
-
#2379
7e4a609Thanks @PowerKiKi! - NewonlyComplete()helper to filter only complete resultsIf you use this, you should probably combine it with
notifyOnNetworkStatusChange. This tells@apollo/clientto not emit the firstpartialresult, soapollo-angulardoes not need to filter it out. The overall behavior is identical, but it saves some CPU cycles.So something like this:
ts apollo .watchQuery({ query: myQuery, notifyOnNetworkStatusChange: false, // Adding this will save CPU cycles }) .valueChanges.pipe(onlyComplete()) .subscribe(result => { // Do something with complete result });
Patch Changes
-
#2355
226a963Thanks @PowerKiKi! - dependencies updates:- Updated dependency
@apollo/client@^4.0.1↗︎ (from^3.13.1, inpeerDependencies) - Updated dependency
rxjs@^7.3.0↗︎ (from^6.0.0 || ^7.0.0, inpeerDependencies)
- Updated dependency
-
#2373
e65bcceThanks @PowerKiKi! - Drop support for node 18 -
#2366
bdff9d9Thanks @PowerKiKi! - Drop ESM2022 in favor of FESM2022 -
#2368
0f10355Thanks @PowerKiKi! - New repository owners@kamilkisiela, the creator of this library, has found new interests and is not able to contribute like in the past. He gracefully transferred ownership of the repository to me. I have been maintaining this library since 2022, and will continue doing so in the foreseeable future.
For the package consumers, pretty much nothing will change. The package name, the code, the relation with The Guild, and the maintenance style will all remain the same. The only difference is the new repository URL: https://github.com/the-guild-org/apollo-angular.