Skip to content

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Sep 9, 2025

This will allow to execute code in the constructor of Apollo Client, essentially allowing for us to modify anything, from overwriting methods, swapping out prototypes, overwriting hook behaviour etc.

These could be exposed as exports from @apollo/client/experiments/name, with usage like

import { throwOnErrorFieldAccess } from "@apollo/client/experiments/toe"
import { matchFragmentsByDocumentTransform } from "@apollo/client/experiments/noMorePossibleTypes"

export const client = new ApolloClient({
  link,
  cache,
  experiments: [throwOnErrorFieldAccess, matchFragmentsByQueryManipulation]
})

Copy link

changeset-bot bot commented Sep 9, 2025

🦋 Changeset detected

Latest commit: 49c0097

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

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

@phryneas phryneas requested a review from jerelmiller September 9, 2025 09:38
@apollo-librarian
Copy link

apollo-librarian bot commented Sep 9, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 7f75dba09c2b39a5bca5f17f
Build Logs: View logs

Copy link

pkg-pr-new bot commented Sep 9, 2025

npm i https://pkg.pr.new/apollographql/apollo-client/@apollo/client@12915

commit: 3fe4502

Copy link
Contributor

github-actions bot commented Sep 9, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 43.5 KB (-0.08% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 38.54 KB (+0.26% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 32.91 KB (-0.03% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 27.06 KB (+0.03% 🔺)
import { ApolloProvider } from "@apollo/client/react" 5.97 KB (0%)
import { ApolloProvider } from "@apollo/client/react" (production) 1001 B (0%)
import { useQuery } from "@apollo/client/react" 7.43 KB (0%)
import { useQuery } from "@apollo/client/react" (production) 2.39 KB (0%)
import { useLazyQuery } from "@apollo/client/react" 7.15 KB (0%)
import { useLazyQuery } from "@apollo/client/react" (production) 2.16 KB (0%)
import { useMutation } from "@apollo/client/react" 6.53 KB (0%)
import { useMutation } from "@apollo/client/react" (production) 1.52 KB (0%)
import { useSubscription } from "@apollo/client/react" 6.84 KB (0%)
import { useSubscription } from "@apollo/client/react" (production) 1.82 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" 8.64 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.67 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" 8.42 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.44 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" 8.38 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.43 KB (0%)
import { useReadQuery } from "@apollo/client/react" 6.65 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production) 1.66 KB (0%)
import { useFragment } from "@apollo/client/react" 6.71 KB (0%)
import { useFragment } from "@apollo/client/react" (production) 1.71 KB (0%)

@github-actions github-actions bot added the auto-cleanup 🤖 label Sep 22, 2025
@phryneas phryneas changed the base branch from main to release-4.1 September 23, 2025 07:33
@phryneas phryneas marked this pull request as ready for review September 23, 2025 07:37
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