Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
b130bc2
Use GITHUB_TOKEN instead of BOT_TOKEN
kamilkisiela Mar 18, 2025
048facb
Add Angular 20 to package.json
mark7-bell May 29, 2025
7e0bced
Add Angular 20 to the testing matrix in main.yml.
mark7-bell May 29, 2025
d85e6ca
Update main.yml
mark7-bell May 29, 2025
20a418e
Drop support for Angular 17
PowerKiKi May 30, 2025
dac4db9
Test on node 22 and 24
PowerKiKi May 30, 2025
bef1e0f
Support component without suffix in e2e
PowerKiKi May 30, 2025
f311133
Declare Angular 20 support
PowerKiKi May 30, 2025
ba4e94d
Update node.js to v22
PowerKiKi May 30, 2025
d61366a
Pre-install wrangler
PowerKiKi May 30, 2025
bdb302a
Drop support for GraphQL 15 (#2364)
PowerKiKi May 30, 2025
f49529b
chore(release): update monorepo packages versions
github-actions[bot] May 30, 2025
bdff9d9
Upgrade ng-packagr to build only FESM without ESM
PowerKiKi Jul 8, 2025
807a5e3
Update release.yml
dotansimha Jul 8, 2025
0f10355
New repository owners
PowerKiKi Jul 9, 2025
d1a1096
Update to stable 4.0 release
jerelmiller Aug 26, 2025
52ba12c
Require recent versions of graphql, rxjs and apollo client
jerelmiller Aug 26, 2025
57796d9
Run codemod
jerelmiller Aug 26, 2025
e4724d0
Run codemod on demo
jerelmiller Aug 26, 2025
85018f8
Update buildOperationForLink to use updated types/signature
jerelmiller Aug 26, 2025
a690513
Add helper to execute with a client context
jerelmiller Aug 26, 2025
ab98b8c
Adjust opration spec to use util
jerelmiller Aug 26, 2025
aa4fd80
Remove generic on ApolloClient.Options type
jerelmiller Aug 26, 2025
bd2cfa6
Update types to be compatible with v4 types
jerelmiller Aug 26, 2025
eada747
Fix call to execute in headers/index.spec
jerelmiller Aug 26, 2025
197cee7
Update QueryRef to be compatible with v4
jerelmiller Aug 26, 2025
5d8471b
Update queryRef spec
jerelmiller Aug 26, 2025
2d33fd7
Fix multiple subscribers test
jerelmiller Aug 26, 2025
2aaed54
Remove fromObservableQuery helper
jerelmiller Aug 26, 2025
decf8cf
Fix queryRef tests
jerelmiller Aug 26, 2025
83607b9
Use MockLink instead of mockSingleLink
jerelmiller Aug 26, 2025
d5fe5f2
Update Apollo class with updated option types
jerelmiller Aug 26, 2025
4b0e5ff
Remove unneeded generics in testing module
jerelmiller Aug 26, 2025
1f670f8
Adjust types to use DefaultContext
jerelmiller Aug 26, 2025
39f7be8
Adjust some types for HttpLink
jerelmiller Aug 26, 2025
2d66be6
Remove some generics
jerelmiller Aug 26, 2025
2633f3a
Update HttpLink/BatchHttpLink tests
jerelmiller Aug 26, 2025
41c777c
Extract helper execute function
jerelmiller Aug 26, 2025
11e3094
Remove unneeded cast
jerelmiller Aug 26, 2025
d677d75
Fix some operation type variables
jerelmiller Aug 26, 2025
0588682
Update utils with updated types
jerelmiller Aug 26, 2025
1b30398
Add reobserve to QueryRef
jerelmiller Aug 26, 2025
341e8c0
Use SubscribeResult
jerelmiller Aug 26, 2025
8f6e46f
Update persisted queries link
jerelmiller Aug 26, 2025
7cc0753
Update TestOperation
jerelmiller Aug 26, 2025
40776a8
Update demo code
jerelmiller Aug 26, 2025
a61071d
Formatting
jerelmiller Aug 26, 2025
961112a
Formatting
jerelmiller Aug 26, 2025
4c61e4b
Fix flush for subscriptions
jerelmiller Aug 26, 2025
451acd7
Update assertions against operationName in batch link
jerelmiller Aug 26, 2025
15952f2
Fix operation names to make test pass
jerelmiller Aug 26, 2025
2b214d8
Add typename when comparing document nodes
jerelmiller Aug 26, 2025
4472c10
Add __typename to test response
jerelmiller Aug 26, 2025
828821b
Add typename when creating request for execute
jerelmiller Aug 26, 2025
e16dd41
New-new repository owners (#2370)
PowerKiKi Aug 26, 2025
e65bcce
Drop support for node 18 (#2373)
PowerKiKi Aug 26, 2025
8477c13
Apply prettier
PowerKiKi Sep 5, 2025
1e8ed69
Compat with no prefix component
PowerKiKi Sep 5, 2025
06ae077
All import from `@apollo/client/core` to avoid react/rehackt errors
PowerKiKi Sep 5, 2025
8bc3336
Merge remote-tracking branch 'origin/master' into jerel/apollo-client-v4
PowerKiKi Sep 5, 2025
0133946
Default TData to unknown and add consistent order
jerelmiller Sep 18, 2025
8c84b90
Rename generics to TData and TVariables
jerelmiller Sep 18, 2025
a38dab8
Export HttpHeadersLink and deprecate httpHeaders function
jerelmiller Sep 18, 2025
86663a5
Remove unneeded spread
jerelmiller Sep 18, 2025
d640d1c
Use class in tests
jerelmiller Sep 18, 2025
dec4e1c
Rework HttpLink options by moving into namespace
jerelmiller Sep 18, 2025
a4c5ca5
Fix issue with type for createHeaders
jerelmiller Sep 18, 2025
5a81fdb
Add ObservableStream helper
jerelmiller Sep 18, 2025
567e0ce
Use ObservableStream to test refetch
jerelmiller Sep 18, 2025
50232ff
Add toEmitAnything matcher
jerelmiller Sep 18, 2025
4dbe718
Move toEmitAnything to own file
jerelmiller Sep 18, 2025
a299082
Use toEmitAnything
jerelmiller Sep 18, 2025
fe50eaa
Update another test to ObservableStream
jerelmiller Sep 18, 2025
a040605
Update another failing test to ObservableStream
jerelmiller Sep 18, 2025
498ed50
Remove tests for useInitialLoading
jerelmiller Sep 18, 2025
839e311
Fix ts issue with mocks
jerelmiller Sep 18, 2025
07211ec
Combine parameters in Query class
jerelmiller Sep 18, 2025
4564cb4
Combine variables into options object for Mutation
jerelmiller Sep 18, 2025
847f591
Combine variables into options for Subscription
jerelmiller Sep 18, 2025
1e2e8a9
Move options types into namespaces
jerelmiller Sep 19, 2025
e740baa
Move useZone option into subscription options
jerelmiller Sep 19, 2025
a594a3b
Add result types to namespace
jerelmiller Sep 19, 2025
65d695c
Update useMutationLoading
jerelmiller Sep 19, 2025
1623a2d
Use ObservableStream in another test
jerelmiller Sep 19, 2025
45c011b
Fix wrong loading emit for useMutationLoading
jerelmiller Sep 19, 2025
5a2e6a3
Update another test to ObservableStream
jerelmiller Sep 19, 2025
9e46253
Adjust test for useZone
jerelmiller Sep 19, 2025
5268a7d
Fix some return types for accuracy
jerelmiller Sep 19, 2025
2d8a7dc
Use ApolloClient as namespace for watchFragment
jerelmiller Sep 19, 2025
76814cd
Import from @apollo/client instead of /core
jerelmiller Sep 19, 2025
d7b9a77
Use @apollo/client in schematics
jerelmiller Sep 19, 2025
a15d211
Formatting
jerelmiller Sep 19, 2025
2f5146c
Fix options type in HttpBatchLink
jerelmiller Sep 19, 2025
e1880f3
Remove outdated tsdoc
jerelmiller Sep 19, 2025
ca961db
Use original order of generic args for deprecated WatchQueryOptions
jerelmiller Sep 19, 2025
6bce3e9
Add license
jerelmiller Sep 19, 2025
be2a827
Just check type when asserting takeNext
jerelmiller Sep 19, 2025
891f736
Use ObservableStream in tests
jerelmiller Sep 19, 2025
d902a1c
Document new default of `notifyOnNetworkStatusChange`
PowerKiKi Sep 19, 2025
bdc93df
Drop `httpHeaders` entirely
PowerKiKi Sep 19, 2025
b9c62a5
Document combined parameters of `Query`, `Mutation` and `Subscription…
PowerKiKi Sep 19, 2025
8c0b7f0
Document move `useZone` option into subscription options
PowerKiKi Sep 19, 2025
7e8fd30
Update doc to import from '@apollo/client'
PowerKiKi Sep 19, 2025
aaa54c9
Prettier
PowerKiKi Sep 19, 2025
44ed9a5
Document namespaced types
PowerKiKi Sep 19, 2025
5239c45
Better flow of types
PowerKiKi Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .changeset/chatty-cherries-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
'apollo-angular': major
---

Namespaced types

Before:

```ts
import type {
Options,
BatchOptions
} from 'apollo-angular/http';

import type {
MutationOptionsAlone,
QueryOptionsAlone,
SubscriptionOptionsAlone,
WatchQueryOptions,
WatchQueryOptionsAlone,
} from 'apollo-angular';

type AllTypes =
| Options
| BatchOptions
| MutationOptionsAlone
| QueryOptionsAlone
| SubscriptionOptionsAlone
| WatchQueryOptions
| WatchQueryOptionsAlone;
```

After:

```ts
import type {
HttpBatchLink,
HttpLink
} from 'apollo-angular/http';

import type {
Apollo,
Mutation,
Query,
Subscription,
} from 'apollo-angular';

type AllTypes =
| HttpLink.Options
| HttpBatchLink.Options
| Mutation.MutateOptions
| Query.FetchOptions
| Subscription.SubscribeOptions
| Apollo.WatchQueryOptions
| Query.WatchOptions;
```
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "kamilkisiela/apollo-angular" }],
"changelog": ["@changesets/changelog-github", { "repo": "Ecodev/apollo-angular" }],
"commit": false,
"access": "public",
"baseBranch": "master",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/early-tigers-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'apollo-angular': patch
---

Drop support for node 18
12 changes: 12 additions & 0 deletions .changeset/funny-trainers-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'apollo-angular': major
---

`httpHeaders` is a class

Migrate your code like so:

```diff
- const link = httpHeaders();
+ const link = new HttpHeadersLink();
```
11 changes: 11 additions & 0 deletions .changeset/giant-clouds-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'apollo-angular': major
---

Move `useZone` option into subscription options


```diff
- const obs = apollo.subscribe(options, { useZone: false });
+ const obs = apollo.subscribe({ ...options, useZone: false });
```
5 changes: 5 additions & 0 deletions .changeset/odd-badgers-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'apollo-angular': patch
---

Drop ESM2022 in favor of FESM2022
14 changes: 14 additions & 0 deletions .changeset/rich-dogs-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'apollo-angular': patch
---

New repository owners

[@kamilkisiela](https://github.com/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](https://github.com/the-guild-org), 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.
26 changes: 26 additions & 0 deletions .changeset/tough-masks-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'apollo-angular': major
---

Combined parameters of `Query`, `Mutation` and `Subscription` classes generated via codegen

Migrate 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' });
}
}
```
3 changes: 1 addition & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# These are supported funding model platforms

github: kamilkisiela
custom: http://paypal.me/kamilkisiela
github: PowerKiKi
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/kamilkisiela/apollo-angular/discussions/new
url: https://github.com/the-guild-org/apollo-angular/discussions/new
about: Request and discuss a feature
- name: Ask a Question
url: https://github.com/kamilkisiela/apollo-angular/discussions/new
url: https://github.com/the-guild-org/apollo-angular/discussions/new
about: Ask questions and discuss with other community members
27 changes: 15 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Use Node.js 18
uses: actions/setup-node@master
- uses: actions/setup-node@master
with:
node-version: 18
node-version: 22

- uses: actions/cache@v4
name: Cache node_modules
Expand Down Expand Up @@ -59,10 +58,9 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Use Node.js 18
uses: actions/setup-node@master
- uses: actions/setup-node@master
with:
node-version: 18
node-version: 22

- uses: actions/cache@v4
name: Cache node_modules
Expand All @@ -89,10 +87,9 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Use Node.js 18
uses: actions/setup-node@master
- uses: actions/setup-node@master
with:
node-version: 18
node-version: 22

- uses: actions/cache@v4
name: Cache node_modules
Expand All @@ -115,9 +112,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
angular_version: [17, 18, 19]
graphql_version: [15, 16]
node_version: [18, 20]
angular_version: [18, 19, 20]
graphql_version: [16]
node_version: [20, 22, 24]
exclude:
- angular_version: 18
node_version: 24

- angular_version: 19
node_version: 24
steps:
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
npmTag: alpha
buildScript: build
nodeVersion: 18
nodeVersion: 22
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
Expand All @@ -36,7 +36,7 @@ jobs:
npmTag: rc
restoreDeletedChangesets: true
buildScript: build
nodeVersion: 18
nodeVersion: 22
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ jobs:
contents: write
id-token: write
packages: write
issues: write
pull-requests: write
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
with:
createGithubReleases: true
releaseScript: release
nodeVersion: 18
nodeVersion: 22
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ jobs:
- uses: the-guild-org/shared-config/setup@main
name: website
with:
nodeVersion: 18 # change if needed
nodeVersion: 22 # change if needed
packageManager: yarn # change if needed

- name: Pre-install wrangler
run: yarn add wrangler --ignore-workspace-root-check

- uses: the-guild-org/shared-config/website-cf@main
name: build and deploy website
env:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
22
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/platform-server": "^18.0.0",
"@angular/router": "^18.0.0",
"@apollo/client": "https://pkg.pr.new/@apollo/client@12221",
"@apollo/client": "4.0.1",
"@babel/core": "^7.24.6",
"@babel/preset-env": "^7.24.6",
"@changesets/changelog-github": "^0.5.0",
Expand All @@ -49,7 +49,7 @@
"graphql": "^16.8.0",
"husky": "^9.0.0",
"lint-staged": "^15.2.5",
"ng-packagr": "^18.0.0",
"ng-packagr": "^19.0.0",
"prettier": "^3.5.3",
"react": "^18.3.1",
"rimraf": "^5.0.7",
Expand Down
Loading
Loading