Skip to content

Add all deprecations and warnings for React APIs #12746

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

Merged
merged 51 commits into from
Jun 27, 2025

Conversation

jerelmiller
Copy link
Member

No description provided.

@jerelmiller jerelmiller requested a review from phryneas June 27, 2025 05:07
Copy link

pkg-pr-new bot commented Jun 27, 2025

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

commit: b585b38

"useLazyQuery",
"Use the `fetchPolicy` option instead."
);
useWarnRemovedOption(warnOpts, "partialRefetch", "useLazyQuery");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
useWarnRemovedOption(warnOpts, "partialRefetch", "useLazyQuery");
if (__DEV__) {
/* eslint-disable react-compiler/react-compiler */
/* eslint-disable react-hooks/rules-of-hooks */

Let's wrap all of these in a if (__DEV__) statement block

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 8b64d1f

Copy link
Member

Choose a reason for hiding this comment

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

Actually I meant the calls I commented on, but that too, yes :D

Copy link
Member Author

Choose a reason for hiding this comment

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

welp I read it wrong haha. Would you prefer to have the call to the hook stripped out or the function body stripped out? I suppose it might reduce more bundle size doing it this way ya?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok better version: 2ff87a2

Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
@jerelmiller jerelmiller force-pushed the jerel/react-deprecations branch from 6180eb6 to f8010eb Compare June 27, 2025 16:29
@github-actions github-actions bot added the auto-cleanup 🤖 label Jun 27, 2025
Base automatically changed from jerel/deprecate-canonize-results to release-3.14 June 27, 2025 16:55
@jerelmiller jerelmiller force-pushed the jerel/react-deprecations branch from f8010eb to b585b38 Compare June 27, 2025 16:55
Copy link
Contributor

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 41.66 KB (+0.15% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 52.7 KB (+1.91% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 48.72 KB (+0.59% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 36.88 KB (+0.08% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 33.9 KB (+0.02% 🔺)
import { ApolloProvider } from "@apollo/client/react" 1.26 KB (-0.08% 🔽)
import { ApolloProvider } from "@apollo/client/react" (production) 1.24 KB (+0.16% 🔺)
import { useQuery } from "@apollo/client/react" 10.54 KB (+2.54% 🔺)
import { useQuery } from "@apollo/client/react" (production) 9.15 KB (+0.08% 🔺)
import { useLazyQuery } from "@apollo/client/react" 9.74 KB (+1.3% 🔺)
import { useMutation } from "@apollo/client/react" 3.95 KB (+9.19% 🔺)
import { useMutation } from "@apollo/client/react" (production) 2.98 KB (+4.82% 🔺)
import { useSubscription } from "@apollo/client/react" 4.56 KB (+3.07% 🔺)
import { useSubscription } from "@apollo/client/react" (production) 3.61 KB (+3.71% 🔺)
import { useSuspenseQuery } from "@apollo/client/react" 6.13 KB (+0.86% 🔺)
import { useSuspenseQuery } from "@apollo/client/react" (production) 4.64 KB (-1.33% 🔽)
import { useBackgroundQuery } from "@apollo/client/react" 5.62 KB (+0.97% 🔺)
import { useBackgroundQuery } from "@apollo/client/react" (production) 4.13 KB (-1.75% 🔽)
import { useLoadableQuery } from "@apollo/client/react" 5.69 KB (+0.91% 🔺)
import { useLoadableQuery } from "@apollo/client/react" (production) 4.21 KB (-1.47% 🔽)
import { useReadQuery } from "@apollo/client/react" 3.43 KB (+0.03% 🔺)
import { useReadQuery } from "@apollo/client/react" (production) 3.38 KB (0%)
import { useFragment } from "@apollo/client/react" 2.55 KB (+0.08% 🔺)
import { useFragment } from "@apollo/client/react" (production) 2.41 KB (-2.37% 🔽)

@jerelmiller jerelmiller merged commit 0bcd2f4 into release-3.14 Jun 27, 2025
31 of 32 checks passed
@jerelmiller jerelmiller deleted the jerel/react-deprecations branch June 27, 2025 17:03
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