apollo-feature-requests icon indicating copy to clipboard operation
apollo-feature-requests copied to clipboard

Introduce some config/option to allow you to throw an error from warnAboutDataLoss (for testing)

Open mansona opened this issue 3 years ago • 0 comments

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 👍

mansona avatar Feb 02 '22 15:02 mansona