Skip to content

change tracking behaviour for QueryInfo #12647

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

Open
wants to merge 21 commits into
base: release-4.0
Choose a base branch
from

Conversation

phryneas
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented May 27, 2025

🦋 Changeset detected

Latest commit: 624bf71

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

Copy link

pkg-pr-new bot commented May 27, 2025

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

commit: 624bf71

Copy link
Contributor

github-actions bot commented May 27, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 42.08 KB (-0.72% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 37.24 KB (-0.75% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 32.31 KB (-0.95% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 26.88 KB (-0.82% 🔽)
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.83 KB (-41.45% 🔽)
import { useQuery } from "@apollo/client/react" (production) 2.19 KB (-69.12% 🔽)
import { useLazyQuery } from "@apollo/client/react" 6.74 KB (0%)
import { useLazyQuery } from "@apollo/client/react" (production) 2.13 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.46 KB (0%)
import { useSubscription } from "@apollo/client/react" (production) 1.83 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" 8.21 KB (+0.12% 🔺)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.59 KB (-0.03% 🔽)
import { useBackgroundQuery } from "@apollo/client/react" 8.01 KB (-0.02% 🔽)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.42 KB (+0.03% 🔺)
import { useLoadableQuery } from "@apollo/client/react" 8.02 KB (+0.3% 🔺)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.39 KB (+0.09% 🔺)
import { useReadQuery } from "@apollo/client/react" 6.23 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production) 1.62 KB (0%)
import { useFragment } from "@apollo/client/react" 6.29 KB (0%)
import { useFragment } from "@apollo/client/react" (production) 1.68 KB (0%)

@phryneas phryneas force-pushed the pr/adjust-query-tracking branch from ea5945f to 6960e06 Compare June 3, 2025 12:00
@phryneas phryneas changed the base branch from pr/observablequery-cancel-on-unsubscribe to release-4.0 June 3, 2025 12:51
@@ -4170,47 +4170,6 @@ describe("ApolloClient", () => {
expect(timesFired).toBe(2);
});

it("should not error on a stopped query()", async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

After reading #4409 it seems to me that this tests to prevent something that could be achieved in a very old iteration of the Query component or by calling QueryManager functions like stopQuery from userland code - but stopQuery since has been removed and we consider QueryManager an internal API.

=> I think it's fine to remove this test.

@phryneas phryneas linked an issue Jun 4, 2025 that may be closed by this pull request
@phryneas phryneas requested a review from jerelmiller June 5, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.0] Register ObservableQuery only after it subscribes
1 participant