Skip to content

Release 4.0 #12201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 266 commits into
base: main
Choose a base branch
from
Draft

Release 4.0 #12201

wants to merge 266 commits into from

Conversation

jerelmiller
Copy link
Member

Staging branch for all 4.0 changes

@svc-apollo-docs
Copy link

svc-apollo-docs commented Dec 9, 2024

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 7c1e3325e91f9e6e896fc41e

Copy link

changeset-bot bot commented Dec 9, 2024

⚠️ No Changeset found

Latest commit: 0517163

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Dec 9, 2024

npm i https://pkg.pr.new/apollographql/apollo-client/@apollo/client@12201

commit: 0517163

Copy link

netlify bot commented Dec 9, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 50dc13f
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/6802796ab822e40008318f86
😎 Deploy Preview https://deploy-preview-12201--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Dec 9, 2024

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 0 B (-100% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 42.7 KB (-15.93% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 37.78 KB (-21.1% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 32.65 KB (-10.14% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 26.97 KB (-20.06% 🔽)
import { ApolloProvider } from "@apollo/client/react" 5.7 KB (+353.31% 🔺)
import { ApolloProvider } from "@apollo/client/react" (production) 960 B (-24.41% 🔽)
import { useQuery } from "@apollo/client/react" 6.99 KB (-30.74% 🔽)
import { useQuery } from "@apollo/client/react" (production) 2.23 KB (-75.26% 🔽)
import { useLazyQuery } from "@apollo/client/react" 6.89 KB (-27.37% 🔽)
import { useMutation } from "@apollo/client/react" 6.22 KB (+72.03% 🔺)
import { useMutation } from "@apollo/client/react" (production) 1.48 KB (-47.87% 🔽)
import { useSubscription } from "@apollo/client/react" 6.57 KB (+48.47% 🔺)
import { useSubscription } from "@apollo/client/react" (production) 1.81 KB (-48.03% 🔽)
import { useSuspenseQuery } from "@apollo/client/react" 8.34 KB (+41.69% 🔺)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.62 KB (-20.59% 🔽)
import { useBackgroundQuery } from "@apollo/client/react" 8.13 KB (+51.02% 🔺)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.38 KB (-16.39% 🔽)
import { useLoadableQuery } from "@apollo/client/react" 8.07 KB (+47.53% 🔺)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.36 KB (-18.35% 🔽)
import { useReadQuery } from "@apollo/client/react" 6.37 KB (+85.53% 🔺)
import { useReadQuery } from "@apollo/client/react" (production) 1.62 KB (-51.87% 🔽)
import { useFragment } from "@apollo/client/react" 6.45 KB (+172.98% 🔺)
import { useFragment } from "@apollo/client/react" (production) 1.7 KB (-26.44% 🔽)
import { useLazyQuery } from "@apollo/client/react" (production) 2.13 KB (+100% 🔺)

jerelmiller and others added 25 commits January 28, 2025 14:58
* move from `ts-node` to `node --experimental-strip-types`, create `build.ts`

* remove `engines` field, specify `devEngines`

* adjust node version for CI

* fix up some more syntax

* prettier

* adjust precheck, bump minimal lockfile version to 3

* convert jest config to esm

* move `entryPoints` to TS, make it work in mjs and jest

* run rollup with ts config

* update a few more node calls

* some more typings

* move all scripts to function invocation

* migrate `prepareChangestsRelease` too

* remove scripts that are not called manually

* convert `prepareDist` to TS

* migrate `precheck.js`

* `version.js->ts`

* use jest ts config

* prettier

* dirname.cjs->cts

* dirname-related import fixes

* fix up new knip issues

* delete `devEngines` instead of `engines` field

* require node 23.6 instead of 22.6
* omit rollup build step

* verifyVersion: verify different entry point

* build esm and cjs (with `.cjs` extension) into different folders

* add a validation check to see if sourcemaps are correct

* adjustments

* remove `rewriteSourceMaps` step

the `inlineSources` tsconfig options already does that

* processInvariants step

* run `prepareDist`

* prettier

* fix up processInvariant exceptions

* delete test for rolled-up build

* tests: older compilation target

* additional tsconfig adjustments

* format

* fix up invariants processing

* add `version` step

* rename option

* migrate `inlineInheritDoc` step

* migrate `postprocessDist` over

* remove dead code

* fix up comment framing

* remove stray `console.log`

* update size limits

* move `renameJsFilesToCjs` file out

* remove obsolete setting of `type: "module"` in `prepareDist`

* `processComments`: exit early

* add changeset
* add babel transform

* remove unneccessary packages

* Update config/babel.ts

* Clean up Prettier, Size-limit, and Api-Extractor

---------

Co-authored-by: phryneas <[email protected]>
* move entry points out of `entryPoints` into `package.json` exports

* build working, jest not working

* formatter

* fixup jest

* add custom resolver, explicitly import `__DEV__`

* prettier

* missing import

* import `__DEV__` when inserted by `processInvariants`

* no more type checking in jest

* use same tsconfig for tests

* reorder ci steps

* update api reports

* use conditions in size limits

* fix up a bunch of things

* attw green

* remove side-effect import for `utilities/globals`

* mark `__DEV__` export as `boolean` in all envs

* add section for `.d.cts`

* size-limit plugin, more dev mode

* work around api extractor package resolution

* knip: ignore `size-limit-apollo-plugin`

* some more cleanup

* add step to script

* fixup

* more changelog

* size-limits for better between-build comparison

* add two new eslint rules

* apply eslint autofixes

* manually fix a bunch of internal-cross-imports

* adjust sizes

* ignore a few cross-imports that are fine

* prettier

* api-exports

* move side effects for `setVerbosity` into `utilities/globals/environment`

* fix up circularities, add check

* move `invariantWrappers.ts` into `invariant/shared.ts`

* inline ts-invariant, no more side effects in __DEV__ declaration

* update exports

* lint

* fix up a bunch of imports

* forgotten file

* fix up import

* set default log level for tests

* fix up dev entrypoint circularity

* fix up a few things around invariant, changelog

* disable eslint rule for wrapping reexport

* add `/index.js` and `folder/folder.cjs` entry points to exports field

* add CI step to run publint

* create `legacyEntryPoints` instead with a subpath pattern in package.json

* reconfigure integration tests to work around npm bug

* fix imports in integration tests

* actually call IIFE

* skip "latest React" intallation for cra4 and cra5

* also run integration tests with react 18

* pin 18.3.1

* fix up node esm tests

* just keep 18.3.0

* deduplicate test setup

* move files out of accidentally nested folder

* also run forgotten jobs

* integration test dep mgmt

* downgrade a tick

* force downgrade in lockfile

* dedupe only where necessary

* npmrc

* update @vitejs/plugin-react-swc and vite

* skip two more runs

* dump package lock

* adjust dedupe command

* try switching to pnpm

* adjust run commands

* add `--no-frozen-lockfile`

* hoist

* use overrides correctly

* drop CRA4 integration test

* CI

* add playwright dep on root level

* prettierignore pnpm-lock.yaml

* fixup next.js integration test

* fix up more imports

* format

* changesets

* some cleanup

* chores

* Update config/build.ts

Co-authored-by: Jerel Miller <[email protected]>

* Update .changeset/real-gorillas-move.md

Co-authored-by: Jerel Miller <[email protected]>

* Clean up Prettier, Size-limit, and Api-Extractor

* adjust next integration test `ci-preparations` command

* adjust import in integration test

---------

Co-authored-by: Jerel Miller <[email protected]>
Co-authored-by: phryneas <[email protected]>
* switch imports to entry-point imports in tests where possible

* configure eslint plugin, update

* first run

* remove `"import/extensions"` eslint rule
it's no longer necessary as we now use `"moduleResolution": "NodeNext"`
that also makes the patch obsolete

* more reordering

* final import order?

* remove `import/extensions` everywhere

* run format

* api-reports

* fixup typecheck command

* size-limits

* format

* fixup dirname ts quirk

* run typecheck first

* cleanup

* update size-limits
@github-actions github-actions bot mentioned this pull request Jun 27, 2025
jerelmiller and others added 9 commits June 27, 2025 11:28
Co-authored-by: Lenz Weber-Tronic <[email protected]>
Co-authored-by: jerelmiller <[email protected]>
…operation`. (#12748)

Co-authored-by: Jerel Miller <[email protected]>
Co-authored-by: jerelmiller <[email protected]>
* Add refetchObservableQueries

* Bind differently

* Use non-deprecated method name

* Add changeset

* Rerun api report

* Update size limits

* adjust changeset

* remove duplicate runtime assignment

---------

Co-authored-by: Lenz Weber-Tronic <[email protected]>
* inline React Compiler runtime

* remove runtime peerDependency

* export tests

* fix CRA5?

* comment

* api report

* add as `react-compiler` export condition

* use compiled version in CI tests

* ensure `react-compiler` export isn't swallowed

* also add `@apollo/client/react/compiled` entry point

* legacy node10 exports

* chores

* remove exports condition

* Clean up Prettier, Size-limit, and Api-Extractor

* changeset

---------

Co-authored-by: phryneas <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@apollo-librarian
Copy link

apollo-librarian bot commented Jul 7, 2025

❌ Docs preview failed

The preview failed to build.

Build ID: 622bb401d5ff5d81cf3a93c3

Errors

react/api/react/hooks

  • No item found for @apollo/client/react!useQuery:function(1)

phryneas and others added 5 commits July 8, 2025 15:18
…gment` (#12757)

* add `dataState` to `useFragment`, `DataValue` type to `useSuspenseFragment`

* Update .changeset/slimy-meals-work.md

Co-authored-by: Jerel Miller <[email protected]>

* Update .changeset/slimy-pots-bow.md

Co-authored-by: Jerel Miller <[email protected]>

---------

Co-authored-by: Jerel Miller <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lenz Weber-Tronic <[email protected]>
@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 26a114346dc826872c9d2933

* changeset annotations

* moar

* forgot to save a file

* finish categorization

* add categorized changesets

* start ordering changesets into stories

* `rxjs` and `ObservableQuery` reordering

* PR review feedback

* update categorization
@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 22829ed7ba91ef2d2ce973c6

phryneas and others added 2 commits July 17, 2025 17:12
* changeset annotations

* moar

* forgot to save a file

* finish categorization

* add categorized changesets

* start ordering changesets into stories

* `rxjs` and `ObservableQuery` reordering

* delete unused documentation files

* documentation updates for `ObservableQuery` api docs

* remove unused frontmatter

* update `useQuery` documented interfaces, split into sub-namespaces

* document new `notifyOnNetworkStatus` default values

* more adjustments

* more `ObservableQuery` changes

* some more adjustments

* chores

* introduce basic claude setup

* some additional changes to the `queries` page

* more canonicalReference updates

* PR suggestions

* Apply suggestions from code review

Co-authored-by: Jerel Miller <[email protected]>

* more feedback

* move `ObservableMethods` into `ObservableQuery.DocumentationTypes`

* chores

---------

Co-authored-by: Jerel Miller <[email protected]>
…aState` to `watchFragment` (#12776)

Co-authored-by: Lenz Weber-Tronic <[email protected]>
Co-authored-by: jerelmiller <[email protected]>
@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: df7722e7279956aaab343eef

@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 99c8e51571f4d94c83e05f6d

…nts the same as fields without arguments (#12370)

Co-authored-by: Jerel Miller <[email protected]>
@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 622bb401d5ff5d81cf3a93c3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants