Major
-
Updated Node.js support to
^20.9.0 || >=22.0.0. -
Use the TypeScript v5.5+ JSDoc tag
@importto import types in modules. To migrate: Upgrade TypeScript to v5.5+. -
Updated the peer dependency
@apollo/clientto^4.0.0, fixing #359. -
Added a new peer dependency
rxjsat^7.3.0. This is an Apollo Client v4 requirement. -
The function
createUploadLinkhas been removed and the upload terminating Apollo Link is now the exported classUploadHttpLinkthat extendsApolloLink. To migrate:- import createUploadLink from "apollo-upload-client/createUploadLink.mjs"; + import UploadHttpLink from "apollo-upload-client/UploadHttpLink.mjs"; const terminatingLink = - createUploadLink({ + new UploadHttpLink({ // Options… });
-
Updated dev dependencies, some of which require newer Node.js versions than previously supported.
Minor
- Added a new function
createUploadLinkoptionincludeUnusedVariablesdefaulting tofalseto toggle including unused GraphQL variables in the request (similar to the ApolloBaseHttpLinkoptionincludeUnusedVariables), via #348.
Patch
- Avoid the deprecated Apollo Link HTTP utility function
createSignalIfSupported. - Improved the upload terminating Apollo Link request handler code:
- Moved all of it into a single constructed
Observerthat’s returned regardless of errors. - More type safe.
- Moved all of it into a single constructed
- Updated the package scripts:
- Reordered and renamed scripts.
- Replaced
npm runwithnode --run. - Target test modules with a glob.
- Updated GitHub Actions CI config:
- Updated workflow triggers.
- Run checks in separate jobs.
- Removed custom step names.
- Updated
actions/checkoutto v5. - Updated
actions/setup-nodeto v4. - Replaced
npm runwithnode --run. - Run tests with Node.js v20, v22, v24.
- Enabled the TypeScript compiler options
noUnusedLocalsandnoUnusedParameters. - Migrated to the ESLint v9 CLI and “flat” config.
- In tests, removed the no longer needed polyfill for the global
File. - In tests, use
ApolloLink.frominstead of the deprecated Apollo Link utility functionconcat. - Improved internal comments.
- Corrected the package field
browserslistto match what’s documented in the readme. - Removed readme advice to consider polyfilling certain globals as they now exist in all supported environments.
- Improved readme examples.
- Fixed a typo in the changelog entry for v18.0.0.