Supposed I want to write and publish an opration to ApolloStore. I can use the writeAndPublish method directly and it seems to work. But there's also writeTransaction method, which aquires the lock for writing the store. Should I use it at all times? When is it safe to just write to the store without acquiring the lock, and when I should make sure to have the lock acquired?
Also writeTransaction method is public, but it accepts a Transaction, which belongs to com.apollographql.apollo.cache.normalized.internal package. Is it safe to use it despite internal package?
writeAndPublish calls writeTransaction under the hood so it should be safe to use that.
Regarding internal packages, it's safer to not rely on them as implementation might change without warning.
Thank you :)