-
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
feat: mutate shortcut #396
base: main
Are you sure you want to change the base?
Conversation
👷 Deploy request for apollo-client-nextjs-docmodel pending review.Visit the deploys page to approve it
|
commit: |
#372 Bundle Size — 1.25MiB (0%).6115c3e(current) vs c125a08 main#352(baseline) Warning Bundle contains 1 duplicate package – View duplicate packages Bundle metrics
|
Current #372 |
Baseline #352 |
|
---|---|---|
Initial JS | 1016.91KiB |
1016.91KiB |
Initial CSS | 70B |
70B |
Cache Invalidation | 4.36% |
24.97% |
Chunks | 34 |
34 |
Assets | 59 |
59 |
Modules | 636 |
636 |
Duplicate Modules | 106 |
106 |
Duplicate Code | 4.66% |
4.66% |
Packages | 26 |
26 |
Duplicate Packages | 1 |
1 |
Bundle size by type no changes
Current #372 |
Baseline #352 |
|
---|---|---|
JS | 1.24MiB |
1.24MiB |
Other | 9.09KiB |
9.09KiB |
CSS | 70B |
70B |
Bundle analysis report Branch Netail:feat/mutate-shortcut Project dashboard
Generated by RelativeCI Documentation Report issue
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 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 :) |
|
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
Not only in server-actions btw, you could also use mutate in API routes (route.ts files) |
@Netail is attempting to deploy a commit to the Apollo Client - Next package - integration tests Team on Vercel. A member of the Team first needs to authorize it. |
Oh gosh, honestly that sounds dangerous - it would be akin to mutating in |
Not that easily hahaha, there should be some logic beforehand (maybe some validation and/or authorization), also can be set on different HTTP methods. But it was just an example of where such mutation function could be used. It's already possible ofc, with |
Yeah, it's possible, I'm just not sure if it should be easily possible 😅 On a sidenote: I'm sorry that this is taking so long - our team got a bit smaller end of last year and while my focus is very much on this repo right now, conceptually it's very far away from Next server actions - I'm working on the React Router and TanStack Start integrations. |
No problem, take your time :) |
As there's a query shortcut, it would be nice to have a mutate shortcut as well. Used in server actions :)