Skip to content
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

make the hook hydration cache resilient against unmounted recreation of ManualDataTransport #375

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Oct 18, 2024

This should fix the issue with an hydration error of useQuery that came up in #368, where no suspense boundary existed and as a result, the useRef of ManualDataTransport became re-initialized.

@phryneas phryneas requested a review from a team as a code owner October 18, 2024 09:35
Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for apollo-client-nextjs-docmodel ready!

Name Link
🔨 Latest commit 4fcd604
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-nextjs-docmodel/deploys/671233e83f865400080c5c42
😎 Deploy Preview https://deploy-preview-375--apollo-client-nextjs-docmodel.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.

Copy link

pkg-pr-new bot commented Oct 18, 2024

yarn@berry undefined https://pkg.pr.new/apollographql/apollo-client-nextjs/@apollo/client-react-streaming@375
yarn@berry undefined https://pkg.pr.new/apollographql/apollo-client-nextjs/@apollo/experimental-nextjs-app-support@375

commit: 4fcd604

Copy link

github-actions bot commented Oct 18, 2024

size-limit report 📦

Path Size
{ ApolloNextAppProvider, ApolloClient, InMemoryCache } from '@apollo/experimental-nextjs-app-support' (Browser ESM) 4.82 KB (+0.31% 🔺)
{ WrapApolloProvider, ApolloClient, InMemoryCache } from '@apollo/client-react-streaming' (Browser ESM) 1.7 KB (0%)
{ buildManualDataTransport } from '@apollo/client-react-streaming/manual-transport' (Browser ESM) 2.9 KB (+0.82% 🔺)
@apollo/client-react-streaming (Browser ESM) 2.41 KB (0%)
@apollo/client-react-streaming (SSR ESM) 7.25 KB (0%)
@apollo/client-react-streaming (RSC ESM) 7.07 KB (0%)
@apollo/client-react-streaming/manual-transport (Browser ESM) 3.1 KB (+0.57% 🔺)
@apollo/client-react-streaming/manual-transport (SSR ESM) 8.21 KB (+0.14% 🔺)
@apollo/experimental-nextjs-app-support (Browser ESM) 5.41 KB (+0.31% 🔺)
@apollo/experimental-nextjs-app-support (SSR ESM) 10.58 KB (+0.02% 🔺)
@apollo/experimental-nextjs-app-support (RSC ESM) 7.13 KB (0%)
@apollo/experimental-nextjs-app-support/rsc (RSC ESM) 6.38 KB (0%)

Copy link

relativeci bot commented Oct 18, 2024

#262 Bundle Size — 1.1MiB (~+0.01%).

4fcd604(current) vs dd8e3a2 main#261(baseline)

Warning

Bundle contains 1 duplicate package – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#262
     Baseline
#261
Regression  Initial JS 923.9KiB(~+0.01%) 923.85KiB
No change  Initial CSS 70B 70B
Change  Cache Invalidation 22.66% 27.55%
No change  Chunks 33 33
No change  Assets 57 57
No change  Modules 588 588
No change  Duplicate Modules 99 99
No change  Duplicate Code 6.23% 6.23%
No change  Packages 26 26
No change  Duplicate Packages 1 1
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#262
     Baseline
#261
Regression  JS 1.09MiB (~+0.01%) 1.09MiB
No change  Other 8.78KiB 8.78KiB
No change  CSS 70B 70B

Bundle analysis reportBranch pr/resilient-hookHydrationCacheProject dashboard


Generated by RelativeCIDocumentationReport issue

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

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

Nice

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.

2 participants