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

writeOperation/writeFragment no longer publish updates by default #5971

Closed
edenman opened this issue Jun 14, 2024 · 7 comments
Closed

writeOperation/writeFragment no longer publish updates by default #5971

edenman opened this issue Jun 14, 2024 · 7 comments

Comments

@edenman
Copy link
Contributor

edenman commented Jun 14, 2024

Version

4.0.0-beta.7

Summary

Recently updated from beta4. writeOperation and writeFragment used to publish by default but now they don't (as a result of #5755)

Steps to reproduce the behavior

No response

Logs

No response

@edenman
Copy link
Contributor Author

edenman commented Jun 14, 2024

(the signatures of the two methods look identical because publish is a default param)

@BoD
Copy link
Contributor

BoD commented Jun 14, 2024

Thanks for flagging! We made the write operations not suspending, but it turned out publish needs to be suspend - so publishing is now removed by default, which is a behavior change. We should highlight that in the migration guide.

@edenman
Copy link
Contributor Author

edenman commented Jun 14, 2024

Yeah. And probably deprecate the non-suspend version? Or at least rename it to something that indicates it doesn't publish updates?

@BoD
Copy link
Contributor

BoD commented Jun 17, 2024

@edenman After some thinking, we think the behavior change warrants an API change, which makes it harder to miss.

In #5976, we change the names of the non publishing write functions and add extensions that have the same signature as in v3. Let us know what you think.

@edenman
Copy link
Contributor Author

edenman commented Jun 18, 2024

#5976 wfm

@BoD
Copy link
Contributor

BoD commented Jul 9, 2024

This has now been released in 4.0.0-rc.1.

Note: if you manually called ApolloStore.publish(), this is no longer needed with the RC onward, as the write methods now publish by default again (same behavior as 3.x). If you were explicitly passing publish = true then no change is needed.

@BoD BoD closed this as completed Jul 9, 2024
Copy link
Contributor

github-actions bot commented Jul 9, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants