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

Remove TCacheShape generic argument from ApolloClient and TSerialized from ApolloCache #12450

Merged
merged 26 commits into from
Mar 19, 2025

Conversation

jerelmiller
Copy link
Member

Closes #12192

Removes the TCacheShape generic argument from ApolloClient and removes the TSerialized generic argument from ApolloCache. This switches the value of cache.extract() to unknown by default unless a subclass specifies a more specific type (e.g. InMemoryCache returns a NormalizedCacheObject type).

@jerelmiller jerelmiller requested a review from phryneas March 17, 2025 19:09
Copy link

changeset-bot bot commented Mar 17, 2025

🦋 Changeset detected

Latest commit: e2afa85

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Major

Not sure what this means? Click here to learn what changesets are.

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

@svc-apollo-docs
Copy link

svc-apollo-docs commented Mar 17, 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: 16ab8d0cd20523133515b7d8

Copy link

pkg-pr-new bot commented Mar 17, 2025

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

commit: e2afa85

Copy link

netlify bot commented Mar 17, 2025

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit e2afa85
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/67dadac46993d10008e00eba
😎 Deploy Preview https://deploy-preview-12450--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 Mar 17, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 41.13 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 36.6 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 31.75 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 26.78 KB (0%)
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.26 KB (0%)
import { useQuery } from "@apollo/client/react" (production) 3.06 KB (0%)
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.47 KB (0%)
import { useMutation } from "@apollo/client/react" (production) 2.22 KB (0%)
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.27 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" (production) 4.08 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" 8.13 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.93 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" 8.17 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.98 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.85 KB (0%)
import { useFragment } from "@apollo/client/react" (production) 1.63 KB (0%)

Copy link
Member

@phryneas phryneas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - happy to see this generic gone!

@github-actions github-actions bot added the auto-cleanup 🤖 label Mar 19, 2025
@jerelmiller jerelmiller merged commit 876d070 into release-4.0 Mar 19, 2025
47 checks passed
@jerelmiller jerelmiller deleted the jerel/remove-tcacheshape branch March 19, 2025 15:06
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.

3 participants