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

apply documentTransforms before rerunning simulated queries #257

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Mar 26, 2024

I believe this would fix #256

While the __typename transform normally is applied in both queries happening during SSR, and in the Browser, in the case where a query could not fully be transported from SSR to the Browser (e.g. in the case an error was thrown on the server, or because the stream closed before it was fully transported over), these would be replayed as "simulated queries", and in that case the transform was not applied.

Hint for review: hide whitespace :)

@phryneas
Copy link
Member Author

/release:pr

Copy link

github-actions bot commented Mar 26, 2024

size-limit report 📦

Path Size
{ ApolloNextAppProvider, NextSSRApolloClient, NextSSRInMemoryCache } from '@apollo/experimental-nextjs-app-support/ssr' (Browser ESM) 7.8 KB (+0.09% 🔺)
{ WrapApolloProvider, ApolloClient, InMemoryCache } from '@apollo/client-react-streaming' (Browser ESM) 1.41 KB (+0.7% 🔺)
{ buildManualDataTransport } from '@apollo/client-react-streaming/manual-transport' (Browser ESM) 6.25 KB (+0.21% 🔺)
@apollo/client-react-streaming (Browser ESM) 2.12 KB (+0.51% 🔺)
@apollo/client-react-streaming (SSR ESM) 1.72 KB (0%)
@apollo/client-react-streaming (RSC ESM) 1020 B (0%)
@apollo/client-react-streaming/manual-transport (Browser ESM) 6.43 KB (+0.13% 🔺)
@apollo/client-react-streaming/manual-transport (SSR ESM) 6.32 KB (0%)
@apollo/experimental-nextjs-app-support/ssr (Browser ESM) 8.4 KB (+0.12% 🔺)
@apollo/experimental-nextjs-app-support/ssr (SSR ESM) 8.31 KB (+0.04% 🔺)
@apollo/experimental-nextjs-app-support/ssr (RSC ESM) 839 B (0%)
@apollo/experimental-nextjs-app-support/rsc (RSC ESM) 261 B (0%)

Copy link

relativeci bot commented Mar 26, 2024

Job #75: Bundle Size — 1.01MiB (~+0.01%).

a66ad6c(current) vs 77e6327 main#65(baseline)

Warning

Bundle contains 1 duplicate package – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #75
     Baseline
Job #65
Regression  Initial JS 890.38KiB(~+0.01%) 890.35KiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.07% 0.03%
No change  Chunks 24 24
No change  Assets 45 45
No change  Modules 512 512
No change  Duplicate Modules 30 30
No change  Duplicate Code 1.29% 1.29%
No change  Packages 29 29
No change  Duplicate Packages 1 1
Bundle size by type  Change 1 change Regression 1 regression
                 Current
Job #75
     Baseline
Job #65
Regression  JS 1023.64KiB (~+0.01%) 1023.61KiB
Not changed  Other 5.99KiB 5.99KiB

View job #75 reportView pr/fix-simulatedQueries branch activityView project dashboard

Copy link

A new release has been made for this PR. You can install the package you need using one of

  • npm i @apollo/experimental-nextjs-app-support@0.0.0-commit-4875530
  • npm i @apollo/client-react-streaming@0.0.0-commit-4875530

@phryneas phryneas marked this pull request as ready for review March 27, 2024 12:38
@phryneas phryneas requested a review from a team as a code owner March 27, 2024 12:38
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.

Looks great!

@phryneas phryneas merged commit 7709ad6 into main Mar 27, 2024
16 checks passed
@phryneas phryneas deleted the pr/fix-simulatedQueries branch March 27, 2024 15:49
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.

__typename field missing in suspense queries
2 participants