|
1 | 1 | # Change log |
2 | 2 |
|
| 3 | +## 12.0.0 |
| 4 | + |
| 5 | +### Major Changes |
| 6 | + |
| 7 | +- [#2372](https://github.com/the-guild-org/apollo-angular/pull/2372) |
| 8 | + [`44ed9a5`](https://github.com/the-guild-org/apollo-angular/commit/44ed9a53ae686ec758b70ae08b0002dd8f5d919b) |
| 9 | + Thanks [@jerelmiller](https://github.com/jerelmiller)! - Namespaced types |
| 10 | + |
| 11 | + Before: |
| 12 | + |
| 13 | + ```ts |
| 14 | + import type { |
| 15 | + MutationOptionsAlone, |
| 16 | + QueryOptionsAlone, |
| 17 | + SubscriptionOptionsAlone, |
| 18 | + WatchQueryOptions, |
| 19 | + WatchQueryOptionsAlone, |
| 20 | + } from 'apollo-angular'; |
| 21 | + import type { BatchOptions, Options } from 'apollo-angular/http'; |
| 22 | + |
| 23 | + type AllTypes = |
| 24 | + | Options |
| 25 | + | BatchOptions |
| 26 | + | MutationOptionsAlone |
| 27 | + | QueryOptionsAlone |
| 28 | + | SubscriptionOptionsAlone |
| 29 | + | WatchQueryOptions |
| 30 | + | WatchQueryOptionsAlone; |
| 31 | + ``` |
| 32 | + |
| 33 | + After: |
| 34 | + |
| 35 | + ```ts |
| 36 | + import type { Apollo, Mutation, Query, Subscription } from 'apollo-angular'; |
| 37 | + import type { HttpBatchLink, HttpLink } from 'apollo-angular/http'; |
| 38 | + |
| 39 | + type AllTypes = |
| 40 | + | HttpLink.Options |
| 41 | + | HttpBatchLink.Options |
| 42 | + | Mutation.MutateOptions |
| 43 | + | Query.FetchOptions |
| 44 | + | Subscription.SubscribeOptions |
| 45 | + | Apollo.WatchQueryOptions |
| 46 | + | Query.WatchOptions; |
| 47 | + ``` |
| 48 | + |
| 49 | +- [#2372](https://github.com/the-guild-org/apollo-angular/pull/2372) |
| 50 | + [`bdc93df`](https://github.com/the-guild-org/apollo-angular/commit/bdc93dfca9c1d408f5bbce45713d63affede0f5c) |
| 51 | + Thanks [@jerelmiller](https://github.com/jerelmiller)! - `httpHeaders` is a class |
| 52 | + |
| 53 | + Migrate your code like so: |
| 54 | + |
| 55 | + ```diff |
| 56 | + - const link = httpHeaders(); |
| 57 | + + const link = new HttpHeadersLink(); |
| 58 | + ``` |
| 59 | + |
| 60 | +- [#2372](https://github.com/the-guild-org/apollo-angular/pull/2372) |
| 61 | + [`8c0b7f0`](https://github.com/the-guild-org/apollo-angular/commit/8c0b7f0b47f4b45ee668a4805edd384f66bf30a2) |
| 62 | + Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move `useZone` option into subscription |
| 63 | + options |
| 64 | + |
| 65 | + ```diff |
| 66 | + - const obs = apollo.subscribe(options, { useZone: false }); |
| 67 | + + const obs = apollo.subscribe({ ...options, useZone: false }); |
| 68 | + ``` |
| 69 | + |
| 70 | +- [#2372](https://github.com/the-guild-org/apollo-angular/pull/2372) |
| 71 | + [`b9c62a5`](https://github.com/the-guild-org/apollo-angular/commit/b9c62a5b4b3b10c408bfb8386286013051bce71d) |
| 72 | + Thanks [@jerelmiller](https://github.com/jerelmiller)! - Combined parameters of `Query`, |
| 73 | + `Mutation` and `Subscription` classes generated via codegen |
| 74 | + |
| 75 | + Migrate your code like so: |
| 76 | + |
| 77 | + ```diff |
| 78 | + class MyComponent { |
| 79 | + myQuery = inject(MyQuery); |
| 80 | + myMutation = inject(MyMutation); |
| 81 | + mySubscription = inject(MySubscription); |
| 82 | + |
| 83 | + constructor() { |
| 84 | + - myQuery.watch({ myVariable: 'foo' }, { fetchPolicy: 'cache-and-network' }); |
| 85 | + + myQuery.watch({ variables: { myVariable: 'foo' }, fetchPolicy: 'cache-and-network' }) |
| 86 | + |
| 87 | + - myMutation.mutate({ myVariable: 'foo' }, { errorPolicy: 'ignore' }); |
| 88 | + + myMutation.mutate({ variables: { myVariable: 'foo' }, errorPolicy: 'ignore' }); |
| 89 | + |
| 90 | + - mySubscription.subscribe({ myVariable: 'foo' }, { fetchPolicy: 'network-only' }); |
| 91 | + + mySubscription.subscribe({ variables: { myVariable: 'foo' }, fetchPolicy: 'network-only' }); |
| 92 | + } |
| 93 | + } |
| 94 | + ``` |
| 95 | + |
| 96 | +### Minor Changes |
| 97 | + |
| 98 | +- [#2379](https://github.com/the-guild-org/apollo-angular/pull/2379) |
| 99 | + [`7e4a609`](https://github.com/the-guild-org/apollo-angular/commit/7e4a60918026373de18ba5357835f43aa1994e8d) |
| 100 | + Thanks [@PowerKiKi](https://github.com/PowerKiKi)! - New `onlyComplete()` helper to filter only |
| 101 | + complete results |
| 102 | + |
| 103 | + If you use this, you should probably combine it with |
| 104 | + [`notifyOnNetworkStatusChange`](https://www.apollographql.com/docs/react/data/queries#queryhookoptions-interface-notifyonnetworkstatuschange). |
| 105 | + This tells `@apollo/client` to not emit the first `partial` result, so `apollo-angular` does not |
| 106 | + need to filter it out. The overall behavior is identical, but it saves some CPU cycles. |
| 107 | + |
| 108 | + So something like this: |
| 109 | + |
| 110 | + ```ts |
| 111 | + apollo |
| 112 | + .watchQuery({ |
| 113 | + query: myQuery, |
| 114 | + notifyOnNetworkStatusChange: false, // Adding this will save CPU cycles |
| 115 | + }) |
| 116 | + .valueChanges.pipe(onlyComplete()) |
| 117 | + .subscribe(result => { |
| 118 | + // Do something with complete result |
| 119 | + }); |
| 120 | + ``` |
| 121 | + |
| 122 | +### Patch Changes |
| 123 | + |
| 124 | +- [#2355](https://github.com/the-guild-org/apollo-angular/pull/2355) |
| 125 | + [`226a963`](https://github.com/the-guild-org/apollo-angular/commit/226a96337f73be26496a9cfd6682230fd61e7304) |
| 126 | + Thanks [@PowerKiKi](https://github.com/PowerKiKi)! - dependencies updates: |
| 127 | + |
| 128 | + - Updated dependency |
| 129 | + [`@apollo/client@^4.0.1` ↗︎](https://www.npmjs.com/package/@apollo/client/v/4.0.1) (from |
| 130 | + `^3.13.1`, in `peerDependencies`) |
| 131 | + - Updated dependency [`rxjs@^7.3.0` ↗︎](https://www.npmjs.com/package/rxjs/v/7.3.0) (from |
| 132 | + `^6.0.0 || ^7.0.0`, in `peerDependencies`) |
| 133 | + |
| 134 | +- [#2373](https://github.com/the-guild-org/apollo-angular/pull/2373) |
| 135 | + [`e65bcce`](https://github.com/the-guild-org/apollo-angular/commit/e65bcce125ac9cfca25ea707f904610afac90906) |
| 136 | + Thanks [@PowerKiKi](https://github.com/PowerKiKi)! - Drop support for node 18 |
| 137 | + |
| 138 | +- [#2366](https://github.com/the-guild-org/apollo-angular/pull/2366) |
| 139 | + [`bdff9d9`](https://github.com/the-guild-org/apollo-angular/commit/bdff9d9c7f8b4c9758126326bed8e1459fb5a533) |
| 140 | + Thanks [@PowerKiKi](https://github.com/PowerKiKi)! - Drop ESM2022 in favor of FESM2022 |
| 141 | + |
| 142 | +- [#2368](https://github.com/the-guild-org/apollo-angular/pull/2368) |
| 143 | + [`0f10355`](https://github.com/the-guild-org/apollo-angular/commit/0f103552a78c9031efb4ec732454f6ce17f02f04) |
| 144 | + Thanks [@PowerKiKi](https://github.com/PowerKiKi)! - New repository owners |
| 145 | + |
| 146 | + [@kamilkisiela](https://github.com/kamilkisiela), the creator of this library, has found new |
| 147 | + interests and is not able to contribute like in the past. He gracefully transferred ownership of |
| 148 | + the repository to me. I have been maintaining this library since 2022, and will continue doing so |
| 149 | + in the foreseeable future. |
| 150 | + |
| 151 | + For the package consumers, pretty much nothing will change. The package name, the code, the |
| 152 | + relation with [The Guild](https://github.com/the-guild-org), and the maintenance style will all |
| 153 | + remain the same. The only difference is the new repository URL: |
| 154 | + https://github.com/the-guild-org/apollo-angular. |
| 155 | + |
3 | 156 | ## 11.0.0 |
4 | 157 |
|
5 | 158 | ### Major Changes |
|
364 | 517 | [`9a8ea5f`](https://github.com/the-guild-org/apollo-angular/commit/9a8ea5f229cf7937d74332092cb3eba40828b7b1) |
365 | 518 | - Add `useMutationLoading` flag |
366 | 519 | [`bc223fe`](https://github.com/the-guild-org/apollo-angular/commit/bc223fe6487edd35c56ad908e4739580ce69f056) |
367 | | -- Fix type inference for Mutations [#1659](https://github.com/the-guild-org/apollo-angular/pull/1659) |
| 520 | +- Fix type inference for Mutations |
| 521 | + [#1659](https://github.com/the-guild-org/apollo-angular/pull/1659) |
368 | 522 | - Declare support for Angular 13 |
369 | 523 | - Remove `extract-files` library from dependencies (you need to pass `extractFiles` function to |
370 | 524 | HttpLink's options) |
@@ -540,7 +694,8 @@ Changes: |
540 | 694 | ([PR #607](https://github.com/the-guild-org/apollo-angular/pull/607)) |
541 | 695 | - Adds `sideEffects: false` (webpack) |
542 | 696 | ([PR #580](https://github.com/the-guild-org/apollo-angular/pull/580)) |
543 | | -- Supports Angular 6 and RxJS 6 ([PR #580](https://github.com/the-guild-org/apollo-angular/pull/580)) |
| 697 | +- Supports Angular 6 and RxJS 6 |
| 698 | + ([PR #580](https://github.com/the-guild-org/apollo-angular/pull/580)) |
544 | 699 |
|
545 | 700 | ## v1.0.1 |
546 | 701 |
|
@@ -638,7 +793,8 @@ Behaves the same as the `ObservableQuery` of `apollo-client`. |
638 | 793 |
|
639 | 794 | ## v0.9.0 |
640 | 795 |
|
641 | | -- Support `apollo-client@0.8.0` ([PR #206](https://github.com/the-guild-org/apollo-angular/pull/206)) |
| 796 | +- Support `apollo-client@0.8.0` |
| 797 | + ([PR #206](https://github.com/the-guild-org/apollo-angular/pull/206)) |
642 | 798 | - Support `es6` modules and `tree-shaking` |
643 | 799 | ([PR #151](https://github.com/the-guild-org/apollo-angular/pull/151), |
644 | 800 | [PR #206](https://github.com/the-guild-org/apollo-angular/pull/206)) |
@@ -669,7 +825,8 @@ Behaves the same as the `ObservableQuery` of `apollo-client`. |
669 | 825 | ## v0.6.0 |
670 | 826 |
|
671 | 827 | - Added support for ApolloClient `v0.5.X` ([PR #]) |
672 | | -- Added `subscribeToMore` function ([PR](https://github.com/the-guild-org/apollo-client-rxjs/pull/5)) |
| 828 | +- Added `subscribeToMore` function |
| 829 | + ([PR](https://github.com/the-guild-org/apollo-client-rxjs/pull/5)) |
673 | 830 | - **BREAKING CHANGE** No no longer support ApolloClient `v0.4.X` |
674 | 831 | - **BREAKING CHANGE** Removed `Apollo` decorator (use `Angular2Apollo` service) |
675 | 832 | - **BREAKING CHANGE** Removed `ApolloQueryPipe` (use `SelectPipe` instead) |
|
0 commit comments