-
Notifications
You must be signed in to change notification settings - Fork 37
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
[experiment/idea] allow enabling "forced suspense" for useQuery hook in SSR #226
base: main
Are you sure you want to change the base?
Conversation
Job #116: Bundle Size — 1.01MiB (+0.65%).Warning Bundle contains 1 duplicate package – View duplicate packages Bundle metrics
|
Current Job #116 |
Baseline Job #115 |
|
---|---|---|
Initial JS | 892.78KiB (+0.25% ) |
890.58KiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 15.31% |
0% |
Chunks | 25 (+4.17% ) |
24 |
Assets | 47 (+4.44% ) |
45 |
Modules | 514 (+0.39% ) |
512 |
Duplicate Modules | 30 |
30 |
Duplicate Code | 1.29% |
1.29% |
Packages | 29 |
29 |
Duplicate Packages | 1 |
1 |
Bundle size by type 2 changes
2 regressions
Current Job #116 |
Baseline Job #115 |
|
---|---|---|
JS | 1.01MiB (+0.62% ) |
1023.84KiB |
Other | 6.38KiB (+6.37% ) |
5.99KiB |
View job #116 report View pr/useQuery_forcedSuspense branch activity View project dashboard
export const dynamic = "force-dynamic"; | ||
|
||
export default function Page() { | ||
enableSSRWaitForUseQuery(useApolloClient()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should usually be called once per application as part of makeClient
, but here I wanted to enable this behaviour just for that one page.
/release:pr |
A new release has been made for this PR. You can install the package you need using one of
|
312f655
to
b1a2f84
Compare
size-limit report 📦
|
This came up in https://community.apollographql.com/t/streaming-without-suspense-in-apollo-nextjs-client/7259 - essentially, we could allow users to opt
useQuery
into suspending during SSR, souseQuery
result could also be streamed from SSR instead of just rendering a "loading" indicator in SSR.If we actually want to do this, it should probably be documented as a "you can do this while you are migrating to suspense" approach.