Skip to content
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

Version Packages (alpha) #12473

Merged
merged 1 commit into from
Mar 24, 2025
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 24, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-4.0, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

release-4.0 is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on release-4.0.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@apollo/[email protected]

Major Changes

  • #12463 3868df8 Thanks @jerelmiller! - ObservableQuery.setOptions has been removed as it was an alias of reobserve. Prefer using reobserve directly instead.

    const observable = client.watchQuery(options);
    
    // Use reobserve to set new options and reevaluate the query
    - observable.setOptions(newOptions);
    + observable.reobserve(newOptions);

    As a result of this change, reobserve has been marked for public use and is no longer considered an internal API. The newNetworkStatus argument has been removed to facilitate this change.

  • #12470 d32902f Thanks @phryneas! - ssrMode, ssrForceFetchDelay and disableNetworkFetches have been reworked:

    Previously, a ObservableQuery created by client.query or client.watchQuery
    while one of those were active would permanently be changed from a fetchPolicy
    of "network-only" or "cache-and-network" to "cache-first", and stay that way
    even long after disableNetworkFetches would have been deactivated.

    Now, the ObservableQuery will keep their original fetchPolicy, but queries
    made during disableNetworkFetches will just apply the fetchPolicy replacement
    at request time, just for that one request.

    ApolloClient.disableNetworkFetches has been renamed to ApolloClient.prioritizeCacheValues to better reflect this behaviour.

  • #12465 a132163 Thanks @jerelmiller! - Flatten out React hook types. As a result, the base types have been removed. Prefer using the hook types instead. Removed types include:

    • BaseMutationOptions
    • BaseQueryOptions
    • BaseSubscriptionOptions
    • ObservableQueryFields
    • MutationSharedOptions
    • QueryFunctionOptions
  • #12463 3868df8 Thanks @jerelmiller! - useQuery no longer returns reobserve as part of its result. It was possible to use reobserve to set new options on the underlying ObservableQuery instance which differed from the options passed to the hook. This could result in unexpected results. Instead prefer to rerender the hook with new options.

Patch Changes

  • #12465 a132163 Thanks @jerelmiller! - Rename all React hook result types and options. These types have all moved under a namespace that matches the hook name. For example, useQuery exports useQuery.Options and useQuery.Result types. As such, the old hook types have been deprecated and will be removed in v5.

@svc-apollo-docs
Copy link

svc-apollo-docs commented Mar 24, 2025

⚠️ Docs preview not attached to branch

The preview was not built because the PR's base branch release-4.0 is not in the list of sources.

An Apollo team member can comment one of the following commands to dictate which branch to attach the preview to:

  • !docs set-base-branch version-2.6
  • !docs set-base-branch main

Build ID: b206ef96048027ef09f0d5bd

Copy link

pkg-pr-new bot commented Mar 24, 2025

npm i https://pkg.pr.new/@apollo/client@12473

commit: c7acf60

Copy link

netlify bot commented Mar 24, 2025

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit c7acf60
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/67e1b10f22dcde0008c6a51a
😎 Deploy Preview https://deploy-preview-12473--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.

@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch from c8c868f to 6fb0d46 Compare March 24, 2025 15:43
Copy link
Contributor Author

github-actions bot commented Mar 24, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 41.22 KB (-0.11% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 36.69 KB (+0.1% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 31.83 KB (-0.08% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 26.86 KB (+0.08% 🔺)
import { ApolloProvider } from "@apollo/client/react" 5.17 KB (0%)
import { ApolloProvider } from "@apollo/client/react" (production) 960 B (0%)
import { useQuery } from "@apollo/client/react" 7.22 KB (0%)
import { useQuery } from "@apollo/client/react" (production) 3 KB (+0.04% 🔺)
import { useLazyQuery } from "@apollo/client/react" 6.39 KB (0%)
import { useLazyQuery } from "@apollo/client/react" (production) 2.17 KB (0%)
import { useMutation } from "@apollo/client/react" 6.46 KB (+0.04% 🔺)
import { useMutation } from "@apollo/client/react" (production) 2.23 KB (+0.05% 🔺)
import { useSubscription } from "@apollo/client/react" 6.83 KB (0%)
import { useSubscription } from "@apollo/client/react" (production) 2.62 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" 8.18 KB (+0.02% 🔺)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.97 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" 8.02 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.81 KB (+0.03% 🔺)
import { useLoadableQuery } from "@apollo/client/react" 8.06 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.87 KB (0%)
import { useReadQuery } from "@apollo/client/react" 5.82 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production) 1.58 KB (0%)
import { useFragment } from "@apollo/client/react" 5.86 KB (-0.02% 🔽)
import { useFragment } from "@apollo/client/react" (production) 1.65 KB (0%)

@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch from 6fb0d46 to a3ad715 Compare March 24, 2025 18:13
@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch from a3ad715 to c7acf60 Compare March 24, 2025 19:22
@github-actions github-actions bot added the auto-cleanup 🤖 label Mar 24, 2025
@jerelmiller jerelmiller merged commit 3f384a9 into release-4.0 Mar 24, 2025
47 of 49 checks passed
@jerelmiller jerelmiller deleted the changeset-release/release-4.0 branch March 24, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants