Skip to content

Conversation

@jerelmiller
Copy link
Member

Saw a small optimization. removeClientSetsFromDocument is essentially just removeDirectivesFromDocument([{ name: 'client', remove: true }], document), so I updated the existing code in favor of one less helper. This saves a touch of bundle size as well.

@jerelmiller jerelmiller requested a review from phryneas May 14, 2025 20:07
@changeset-bot
Copy link

changeset-bot bot commented May 14, 2025

⚠️ No Changeset found

Latest commit: 080083d

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented May 14, 2025

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

commit: 9760195

@github-actions
Copy link
Contributor

github-actions bot commented May 14, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 41.85 KB (-0.21% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 37.47 KB (-0.06% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 32.29 KB (-0.04% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 27.22 KB (+0.02% 🔺)
import { ApolloProvider } from "@apollo/client/react" 5.19 KB (0%)
import { ApolloProvider } from "@apollo/client/react" (production) 963 B (0%)
import { useQuery } from "@apollo/client/react" 10.38 KB (0%)
import { useQuery } from "@apollo/client/react" (production) 6.13 KB (0%)
import { useLazyQuery } from "@apollo/client/react" 6.35 KB (0%)
import { useLazyQuery } from "@apollo/client/react" (production) 2.12 KB (-0.14% 🔽)
import { useMutation } from "@apollo/client/react" 5.73 KB (0%)
import { useMutation } from "@apollo/client/react" (production) 1.48 KB (-0.14% 🔽)
import { useSubscription } from "@apollo/client/react" 6.08 KB (0%)
import { useSubscription } from "@apollo/client/react" (production) 1.82 KB (-0.86% 🔽)
import { useSuspenseQuery } from "@apollo/client/react" 7.82 KB (+0.12% 🔺)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.58 KB (-0.03% 🔽)
import { useBackgroundQuery } from "@apollo/client/react" 7.64 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.41 KB (-0.06% 🔽)
import { useLoadableQuery } from "@apollo/client/react" 7.63 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.39 KB (0%)
import { useReadQuery } from "@apollo/client/react" 5.86 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production) 1.61 KB (0%)
import { useFragment } from "@apollo/client/react" 5.91 KB (0%)
import { useFragment } from "@apollo/client/react" (production) 1.68 KB (0%)

@jerelmiller jerelmiller force-pushed the jerel/remove-extra-util branch from 080083d to 9760195 Compare May 16, 2025 15:50
@jerelmiller jerelmiller merged commit 0c9468b into release-4.0 May 16, 2025
42 of 43 checks passed
@jerelmiller jerelmiller deleted the jerel/remove-extra-util branch May 16, 2025 15:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants