Skip to content

Fix emitted fetchMore result from observableQuery for no-cache queries#12351

Merged
jerelmiller merged 6 commits intomainfrom
jerel/check-emitted-fetchmore-result
Feb 7, 2025
Merged

Fix emitted fetchMore result from observableQuery for no-cache queries#12351
jerelmiller merged 6 commits intomainfrom
jerel/check-emitted-fetchmore-result

Conversation

@jerelmiller
Copy link
Copy Markdown
Member

I discovered this issue when working on some updates for 4.0. When fetchMore is executed for a no-cache query, the wrong networkStatus and loading value is emitted for the final result in the observable. This doesn't currently affect useQuery because useQuery uses getCurrentResult() which returns the right values.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: e921e62

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

This PR includes changesets to release 1 package
Name Type
@apollo/client Patch

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

@svc-apollo-docs
Copy link
Copy Markdown

svc-apollo-docs commented Feb 7, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 966c3b87f5c905ec5257ca1a

@jerelmiller jerelmiller requested a review from phryneas February 7, 2025 00:30
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 7, 2025

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

commit: e921e62

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 7, 2025

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit e921e62
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/67a63eb2d9198b000862130e
😎 Deploy Preview https://deploy-preview-12351--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 7, 2025

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 40.67 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 50.1 KB (+0.03% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 47.21 KB (+0.03% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 36.19 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 33.59 KB (+0.03% 🔺)
import { ApolloProvider } from "dist/react/index.js" 1.26 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production) 1.24 KB (0%)
import { useQuery } from "dist/react/index.js" 5.21 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.29 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 5.7 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.78 KB (0%)
import { useMutation } from "dist/react/index.js" 3.62 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.84 KB (0%)
import { useSubscription } from "dist/react/index.js" 4.42 KB (0%)
import { useSubscription } from "dist/react/index.js" (production) 3.48 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 5.51 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.17 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" 5.01 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.66 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 5.09 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.74 KB (0%)
import { useReadQuery } from "dist/react/index.js" 3.42 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 3.36 KB (0%)
import { useFragment } from "dist/react/index.js" 2.36 KB (0%)
import { useFragment } from "dist/react/index.js" (production) 2.31 KB (0%)

@github-actions github-actions Bot added the auto-cleanup 🤖 label Feb 7, 2025
@jerelmiller jerelmiller merged commit 3da908b into main Feb 7, 2025
@jerelmiller jerelmiller deleted the jerel/check-emitted-fetchmore-result branch February 7, 2025 17:16
@github-actions github-actions Bot mentioned this pull request Feb 7, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants