Hi everyone, I'm toying with react-flow to build a custom logic graph. Let's say I have nodes for string manipulation (like concatenating two strings) and arithmetic operations (like adding two numbers). Each source and target handle have a defined type, meaning they produce/accept a string or a number.
How can I validate that I can't connect a "number" source with a "string" target? The handle's have different ids, so I can't use a generic id like "string" or "number" for validation in the "isValidConnection" method.
I was hoping that I could somehow attach more "metadat" to a handle beside the id that would be available in the "isValidConnection" method, but it seems I'm out of luck.
Any ideas?