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

feat: mutate shortcut #396

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

Conversation

Netail
Copy link
Contributor

@Netail Netail commented Nov 29, 2024

As there's a query shortcut, it would be nice to have a mutate shortcut as well. Used in server actions :)

@Netail Netail requested a review from a team as a code owner November 29, 2024 13:14
Copy link

netlify bot commented Nov 29, 2024

👷 Deploy request for apollo-client-nextjs-docmodel pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 07b01ac

Copy link

pkg-pr-new bot commented Nov 29, 2024

npm i https://pkg.pr.new/apollographql/apollo-client-nextjs/@apollo/client-react-streaming@396
npm i https://pkg.pr.new/apollographql/apollo-client-nextjs/@apollo/experimental-nextjs-app-support@396

commit: 07b01ac

Copy link

relativeci bot commented Nov 29, 2024

#346 Bundle Size — 1.25MiB (+0.01%).

07b01ac(current) vs 9d0a77a main#331(baseline)

Warning

Bundle contains 1 duplicate package – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#346
     Baseline
#331
Regression  Initial JS 1016.91KiB(+0.01%) 1016.77KiB
No change  Initial CSS 70B 70B
Change  Cache Invalidation 24.94% 0.08%
No change  Chunks 34 34
No change  Assets 59 59
No change  Modules 636 636
No change  Duplicate Modules 106 106
No change  Duplicate Code 4.66% 4.66%
No change  Packages 26 26
No change  Duplicate Packages 1 1
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#346
     Baseline
#331
Regression  JS 1.24MiB (+0.01%) 1.24MiB
No change  Other 9.09KiB 9.09KiB
No change  CSS 70B 70B

Bundle analysis reportBranch Netail:feat/mutate-shortcutProject dashboard


Generated by RelativeCIDocumentationReport issue

@phryneas
Copy link
Member

Hi @Netail, thank you for the PR!

Before I get this merged, I'll have to do some investigation - I very roughly remember that the behaviour of registerApolloClient in Server Actions changed between versions of Next.js, so I'll have to double-check that everything works as intended there before we get this change in that encourages usage of rAC in server actions. (We never explicitly targeted them until now.)

I hope I can get to that next week, so please have a bit of patience :)

@Netail
Copy link
Contributor Author

Netail commented Nov 29, 2024

Hi @Netail, thank you for the PR!

Before I get this merged, I'll have to do some investigation - I very roughly remember that the behaviour of registerApolloClient in Server Actions changed between versions of Next.js, so I'll have to double-check that everything works as intended there before we get this change in that encourages usage of rAC in server actions. (We never explicitly targeted them until now.)

I hope I can get to that next week, so please have a bit of patience :)

That's completely fine, please let me know, we current use getClient().mutate with NextJS 14.2.x without issues, but could ofc be different with Next 15 :)

Copy link

changeset-bot bot commented Dec 27, 2024

⚠️ No Changeset found

Latest commit: 07b01ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets
Name Type
@apollo/client-react-streaming Patch
@apollo/experimental-nextjs-app-support Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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