Skip to content

Add test for changing variables with error returned with notifyOnNetworkStatusChange: false #12702

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 2 commits into from
Jun 17, 2025

Conversation

jerelmiller
Copy link
Member

Closes #12551

It appears this bug was fixed between now and 4.0.0-alpha.8 which exhibited the buggy behavior. Since this bug is already fixed, this PR adds tests to ensure we don't have any regressions for this behavior in future changes.

Copy link

pkg-pr-new bot commented Jun 16, 2025

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

commit: 53a6aca

Copy link
Contributor

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 42.28 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 37.46 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 32.5 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 27.08 KB (0%)
import { ApolloProvider } from "@apollo/client/react" 5.58 KB (0%)
import { ApolloProvider } from "@apollo/client/react" (production) 963 B (0%)
import { useQuery } from "@apollo/client/react" 6.85 KB (0%)
import { useQuery } from "@apollo/client/react" (production) 2.2 KB (0%)
import { useLazyQuery } from "@apollo/client/react" 6.76 KB (0%)
import { useLazyQuery } from "@apollo/client/react" (production) 2.14 KB (0%)
import { useMutation } from "@apollo/client/react" 6.11 KB (0%)
import { useMutation } from "@apollo/client/react" (production) 1.48 KB (0%)
import { useSubscription } from "@apollo/client/react" 6.43 KB (0%)
import { useSubscription } from "@apollo/client/react" (production) 1.8 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" 8.23 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.61 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" 7.97 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.38 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" 7.97 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.36 KB (0%)
import { useReadQuery } from "@apollo/client/react" 6.25 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production) 1.62 KB (0%)
import { useFragment } from "@apollo/client/react" 6.3 KB (0%)
import { useFragment } from "@apollo/client/react" (production) 1.68 KB (0%)

@github-actions github-actions bot added the auto-cleanup 🤖 label Jun 17, 2025
@jerelmiller jerelmiller merged commit 7e2db0b into release-4.0 Jun 17, 2025
42 checks passed
@jerelmiller jerelmiller deleted the jerel/change-vars-error branch June 17, 2025 17:42
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.

[4.0] useLazyQuery: Changing variables that return error leaves previous data when notifyOnNetworkStatusChange is false
2 participants