apollo-feature-requests
apollo-feature-requests copied to clipboard
Introduce some config/option to allow you to throw an error from warnAboutDataLoss (for testing)
Hey folks 👋
We've just come across the warnAboutDataLoss message while developing a feature (thanks for the detailed message btw 🎉 ) but it got me thinking. It would be great if we could cause that particular warning to actually throw an error with some configuration so that we could get a signal from tests when this behaviour is introduced.
I don't see any way with the current architecture of that function to easily add something like this 🤔 but I also suppose it's worth opening up a wider discussion around having this sort of "warning in dev but configurable to an error" concept is something that you want to consider in apollo-client
Anyway, just a thought. Let me know if you have any questions 👍