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

0.10.0 (2) - Warn if makeClient returns the same client for multiple requests. #205

Merged
merged 10 commits into from
Apr 4, 2024

Conversation

phryneas
Copy link
Member

No description provided.

@phryneas phryneas requested a review from a team as a code owner February 19, 2024 13:47
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.

I assume that you haven't written tests because this is an [idea] right?

In general I like this idea a lot since it at least gives some indication of a potential footgun for those that are possibly unaware of the impact of returning the same client instance. Nice work!

@phryneas
Copy link
Member Author

Yup, I wanted to make sure we actually want to do this before I get into the nitty-gritty of figuring out how to write a test against a RSC environment :)

@phryneas phryneas added this to the 0.10.0 milestone Feb 27, 2024
@phryneas phryneas force-pushed the pr/getClient-forceNoParameters branch from 4c1330e to 407204a Compare March 1, 2024 15:32
@phryneas phryneas force-pushed the pr/getClient-makeUniqueClients branch from 491348d to 4b786c2 Compare March 1, 2024 16:55
@phryneas phryneas changed the title [idea] Warn if makeClient returns the same client for multiple requests. 0.10.0 (2) - Warn if makeClient returns the same client for multiple requests. Mar 4, 2024
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.

Had some small suggestions on wording, but this is great!

@phryneas phryneas force-pushed the pr/getClient-forceNoParameters branch from 0abc532 to d06e3c2 Compare March 6, 2024 11:39
@phryneas phryneas force-pushed the pr/getClient-makeUniqueClients branch from 8e0bb7c to d316a92 Compare March 6, 2024 11:40
@phryneas phryneas force-pushed the pr/getClient-makeUniqueClients branch from 3ea0f36 to ac208d7 Compare March 26, 2024 12:53
Copy link

relativeci bot commented Mar 26, 2024

Job #106: Bundle Size — 1.01MiB (0%).

c127d4f(current) vs e0b4862 main#104(baseline)

Warning

Bundle contains 1 duplicate package – View duplicate packages

Bundle metrics  no changes
                 Current
Job #106
     Baseline
Job #104
No change  Initial JS 890.59KiB 890.59KiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0.04% 0.04%
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  no changes
                 Current
Job #106
     Baseline
Job #104
Not changed  JS 1023.85KiB 1023.85KiB
Not changed  Other 5.99KiB 5.99KiB

View job #106 reportView pr/getClient-makeUniqueClients branch activityView project dashboard

Base automatically changed from pr/getClient-forceNoParameters to main April 4, 2024 09:19
Copy link

github-actions bot commented Apr 4, 2024

size-limit report 📦

Path Size
{ ApolloNextAppProvider, NextSSRApolloClient, NextSSRInMemoryCache } from '@apollo/experimental-nextjs-app-support/ssr' (Browser ESM) 7.79 KB (0%)
{ WrapApolloProvider, ApolloClient, InMemoryCache } from '@apollo/client-react-streaming' (Browser ESM) 1.41 KB (0%)
{ buildManualDataTransport } from '@apollo/client-react-streaming/manual-transport' (Browser ESM) 6.27 KB (0%)
@apollo/client-react-streaming (Browser ESM) 2.14 KB (0%)
@apollo/client-react-streaming (SSR ESM) 1.74 KB (0%)
@apollo/client-react-streaming (RSC ESM) 1.33 KB (+18.68% 🔺)
@apollo/client-react-streaming/manual-transport (Browser ESM) 6.46 KB (0%)
@apollo/client-react-streaming/manual-transport (SSR ESM) 6.34 KB (0%)
@apollo/experimental-nextjs-app-support/ssr (Browser ESM) 8.41 KB (0%)
@apollo/experimental-nextjs-app-support/ssr (SSR ESM) 8.33 KB (0%)
@apollo/experimental-nextjs-app-support/ssr (RSC ESM) 867 B (+1.17% 🔺)
@apollo/experimental-nextjs-app-support/rsc (RSC ESM) 626 B (+54.19% 🔺)

@phryneas phryneas merged commit d98b87b into main Apr 4, 2024
16 checks passed
@phryneas phryneas deleted the pr/getClient-makeUniqueClients branch April 4, 2024 09:44
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.

None yet

2 participants