@GogoVega
Can you explain how this problem would be solved? Just rely on runtime errors? Let Node C get the output of Node A and throw an exception at runtime, after the user has deployed the flow?
@gregorius
Disregard my use case. Aren't there any nodes you think that would be weird if they be connected together? Or that they wouldn't work if they were connected?
What made me say that is because it's "feature request" hence it's need to be done. So if you don't do it, then someone else needs to do it. This might well have been me thinking too far ahead - mea culpa & my apologises.
This thread appears to have got heated. There's no need for that.
Bringing it back to the proposal - the basic idea here is to optionally allow nodes to specify some sort of rules as to what they can be wired to.
It is not a proposal that suddenly every single node should start doing this - but that, for a specific use case that @AllanOricil has, that the user of his nodes would benefit from having such a constraint applied to help them use those nodes. We have had similar requests in the past - where Node-RED is being used in specific scenarios with custom sets of nodes which have their own rules for usage.
I don't have an objection to considering this capability - as it does address a reasonable requirement, but doesn't impose anything on anyone not using those nodes. I would say it feels like an editor-only capability initially; it think it would be unnecessary for the runtime to police it as well if the editor can help prevent the user creating an 'invalid' configuration in the first place. Plus, given the way configuration isn't shared between runtime and editor, it would require the node author to duplicate the rules in both places.
There's a bunch of fine detail to consider around the full UX here - Allan has thought through a number of cases and proposed behaviours. We'd want to think through that detail before moving forward - being the weekend, I'm not able to deep dive into to at the moment.