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) #12221

Open
wants to merge 1 commit into
base: release-4.0
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 13, 2024

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

  • #12222 d1a9054 Thanks @jerelmiller! - Drop support for React 16.

  • #12224 51e6c0f Thanks @jerelmiller! - Remove deprecated partialRefetch option.

  • #12211 c2736db Thanks @jerelmiller! - Remove the deprecated graphql, withQuery, withMutation, withSubscription, and withApollo hoc components. Use the provided React hooks instead.

  • #12262 10ef733 Thanks @jerelmiller! - Remove itAsync test utility.

  • #12304 86469a2 Thanks @jerelmiller! - The Cache.DiffResult<T> type is now a union type with better type safety for both complete and partial results. Checking diff.complete will now narrow the type of result depending on whether the value is true or false.

    When true, diff.result will be a non-null value equal to the T generic type. When false, diff.result now reports result as DeepPartial<T> | null indicating that fields in the result may be missing (DeepPartial<T>) or empty entirely (null).

  • #12254 0028ac0 Thanks @jerelmiller! - Changes the default Accept header to application/graphql-response+json.

  • #12223 69c1cb6 Thanks @jerelmiller! - Remove subscribeAndCount testing utility from @apollo/client/testing.

  • #12300 4d581e4 Thanks @jerelmiller! - Moves all React-related exports to the @apollo/client/react entrypoint and out of the main @apollo/client entrypoint. This prevents the need to install React in order to use the core client.

    The following is a list of exports available in @apollo/client that should now import from @apollo/client/react.

    • ApolloConsumer
    • ApolloProvider
    • createQueryPreloader
    • getApolloContext
    • skipToken
    • useApolloClient
    • useBackgroundQuery
    • useFragment
    • useLazyQuery
    • useLoadableQuery
    • useMutation
    • useQuery
    • useQueryRefHandlers
    • useReactiveVar
    • useReadQuery
    • useSubscription
    • useSuspenseQuery

    The following is a list of exports available in @apollo/client/testing that should now import from @apollo/client/testing/react:

    • MockedProvider
  • #12304 86469a2 Thanks @jerelmiller! - ### Changes for users of InMemoryCache

    cache.diff now returns null instead of an empty object ({}) when returnPartialData is true and the result is empty.

    If you use cache.diff directly with returnPartialData: true, you will need to check for null before accessing any other fields on the result property. A non-null value indicates that at least one field was present in the cache for the given query document.

    Changes for third-party cache implementations

    The client now expects cache.diff to return null instead of an empty object when there is no data that can be fulfilled from the cache and returnPartialData is true. If your cache implementation returns an empty object, please update this to return null.

  • #12304 86469a2 Thanks @jerelmiller! - ### Changes for users of InMemoryCache

    cache.diff no longer throws when returnPartialData is set to false without a complete result. Instead, cache.diff will return null when it is unable to read a full cache result.

    If you use cache.diff directly with returnPartialData: false, remove the try/catch block and replace with a check for null.

    Changes for third-party cache implementations

    The client now expects cache.diff to return null instead of throwing when the cache returns an incomplete result and returnPartialData is false. The internal try/catch blocks have been removed around cache.diff. If your cache implementation throws for incomplete results, please update this to return null.

  • #12211 c2736db Thanks @jerelmiller! - Remove the deprecated Query, Mutation, and Subscription components. Use the provided React hooks instead.

Patch Changes

@svc-apollo-docs
Copy link

svc-apollo-docs commented Dec 13, 2024

⚠️ 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: d71cdc6bcc0c4ddb9f51c5d2

Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit f0bd4c5
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/679d08b5b1615d000872500a
😎 Deploy Preview https://deploy-preview-12221--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 a43e71a to 0fa9848 Compare December 16, 2024 09:23
Copy link

pkg-pr-new bot commented Dec 16, 2024

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

commit: f0bd4c5

Copy link
Contributor Author

github-actions bot commented Dec 16, 2024

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 33.47 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 41.42 KB (+0.03% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 38.73 KB (+0.04% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 36.15 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 33.56 KB (+0.02% 🔺)
import { ApolloProvider } from "dist/react/index.js" 1.26 KB (+0.39% 🔺)
import { ApolloProvider } from "dist/react/index.js" (production) 1.25 KB (+0.4% 🔺)
import { useQuery } from "dist/react/index.js" 5.13 KB (+0.1% 🔺)
import { useQuery } from "dist/react/index.js" (production) 4.21 KB (+0.12% 🔺)
import { useLazyQuery } from "dist/react/index.js" 5.61 KB (+0.09% 🔺)
import { useLazyQuery } from "dist/react/index.js" (production) 4.69 KB (+0.11% 🔺)
import { useMutation } from "dist/react/index.js" 3.63 KB (+0.14% 🔺)
import { useMutation } from "dist/react/index.js" (production) 2.85 KB (+0.11% 🔺)
import { useSubscription } from "dist/react/index.js" 4.43 KB (+0.12% 🔺)
import { useSubscription } from "dist/react/index.js" (production) 3.48 KB (+0.15% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" 5.52 KB (+0.09% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.17 KB (+0.12% 🔺)
import { useBackgroundQuery } from "dist/react/index.js" 5.02 KB (+0.1% 🔺)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.66 KB (+0.11% 🔺)
import { useLoadableQuery } from "dist/react/index.js" 5.1 KB (+0.12% 🔺)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.74 KB (+0.08% 🔺)
import { useReadQuery } from "dist/react/index.js" 3.42 KB (+0.21% 🔺)
import { useReadQuery } from "dist/react/index.js" (production) 3.36 KB (+0.09% 🔺)
import { useFragment } from "dist/react/index.js" 2.01 KB (+0.15% 🔺)
import { useFragment } from "dist/react/index.js" (production) 1.96 KB (+0.15% 🔺)

@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch 2 times, most recently from 163864b to 913da8a Compare December 16, 2024 09:38
@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch 3 times, most recently from 1f0c587 to 07fa847 Compare January 13, 2025 20:18
@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch 6 times, most recently from e6906d2 to 5302881 Compare January 24, 2025 22:43
@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch 7 times, most recently from b1ea995 to 3e1b8a9 Compare January 31, 2025 17:01
@apollogithubactionsbot apollogithubactionsbot bot force-pushed the changeset-release/release-4.0 branch from 3e1b8a9 to f0bd4c5 Compare January 31, 2025 17:30
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.

1 participant